Skip to main content
Lionel Dyck
Participating Frequently
Mar 1, 2021 9:13 PM UTC

git anomaly on test lpar

I'm having an issue on a test lpar with git for z/OS – both version 2.14 and the latest 2.26 ports. 

I've looked at this as have several others without success. 

When I attempt a git clone I get this error: 

fatal: protocol error: bad line length character: ---Á  

When I do a ssh git@github.com git-receive-pack lbdyck/qtab.git I get this:

--ÄÁ---Ä--Ã----Ã-À--ÄÂÂ--Á-/ÄÁ-------À----/--ÊÁÃËÇÁ/ÀË_/ËÈÁÊÊÁø?ÊÈ-ËÈ/ÈÍË-ÊÁø?ÊÈ-ËÈ/ÈÍË-Î--ÀÁ%ÁÈÁ-ÊÁÃË-ËÑÀÁ-Â/>À---,-ÉÍÑÁÈ-/È?_ÑÄ-?Ã

Ë-ÀÁ%È/-øÍËÇ-?øÈÑ?>Ë-?¦ÁÄÈ-Ã?Ê_/È-ËÇ/--/ÅÁ>È-ÅÑÈÅÑÈÇÍÂ-Å-ÃÃ-Ä/À----------                          

 

If I do the same ssh git@github.com git-receive-pack lbdyck/qtab.git on one of my other systems it looks like this:

00ce342c27f0363f6d24cbb68e8ace7454218d4828a2 refs/heads/masterreport-status report-status-v2 delete-refs side-band-64k quiet atomic

ofs-delta push-options object-format=sha1 agent=git/github-g2ff1cad44179   

I have these in the environment:

_BPXK_AUTOCVT=ON
_CEE_RUNOPTS=FILETAG(AUTOCVT,AUTOTAG) POSIX(ON)
_TAG_REDIR_IN=txt    
_TAG_REDIR_OUT=txt   
_TAG_REDIR_ERR=txt    

We've looked at the TCP/IP setup, the SSH setup, and the Git setup with no joy.  We've also confirmed that the ssh public key has been properly added to github.

 

Can anyone provide any suggestions that will help resolve this?



------------------------------
Lionel Dyck
lbdyck
------------------------------

    18 replies

    David Crayford
    Rocketeer
    Mar 8, 2021 12:08 AM UTC
    Found the issue - on this system (z/OS 2.4) the zos_ssh_config had

    ChannelConvert shell

    It should have had 

    ChannelConvert shell,exec

    Making this change and then doing this solved the problem
    kill -s HUP $(cat /var/run/sshd.pid)


    ------------------------------
    Lionel Dyck
    lbdyck
    ------------------------------

    Thanks for letting us know Lionel.Did you need to specify exec to get it to work with bpxwunix()?

    Can you also post your resolution to the IBMMAIN thread for the archives?

    Thanks



    ------------------------------
    David Crayford
    Senior Software Engineer
    Rocket Software
    ------------------------------
    Lionel Dyck
    Participating Frequently
    Mar 8, 2021 8:39 AM UTC

    Thanks for letting us know Lionel.Did you need to specify exec to get it to work with bpxwunix()?

    Can you also post your resolution to the IBMMAIN thread for the archives?

    Thanks



    ------------------------------
    David Crayford
    Senior Software Engineer
    Rocket Software
    ------------------------------
    One other interesting fact on this.  On another z/OS 2.4 LPAR there is no problem and there is no zos_ssh_config file.

    Curious....

    ------------------------------
    Lionel Dyck
    lbdyck
    ------------------------------
    Jorn Thyssen
    Rocketeer
    Mar 8, 2021 9:04 AM UTC
    One other interesting fact on this.  On another z/OS 2.4 LPAR there is no problem and there is no zos_ssh_config file.

    Curious....

    ------------------------------
    Lionel Dyck
    lbdyck
    ------------------------------
    Hi Lionel,

    The default is shell,exec according to
    https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.4.0/com.ibm.zos.v2r4.foto100/fotz1141.htm

    ------------------------------
    Joern Thyssen
    Rocket Software
    ------------------------------
    Lionel Dyck
    Participating Frequently
    Mar 8, 2021 9:20 AM UTC
    Hi Lionel,

    The default is shell,exec according to
    https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.4.0/com.ibm.zos.v2r4.foto100/fotz1141.htm

    ------------------------------
    Joern Thyssen
    Rocket Software
    ------------------------------
    That would explain why it works on the system without the zos_ssh_config.  Why it was created on the system I had the issue on is a question that probably won't get an answer.

    ------------------------------
    Lionel Dyck
    lbdyck
    ------------------------------
    Jorn Thyssen
    Rocketeer
    Mar 8, 2021 9:28 AM UTC
    That would explain why it works on the system without the zos_ssh_config.  Why it was created on the system I had the issue on is a question that probably won't get an answer.

    ------------------------------
    Lionel Dyck
    lbdyck
    ------------------------------
    What if the sysprog used git to version control the config files and parmlib members... :) Infrastructure-as-code...

    ------------------------------
    Joern Thyssen
    Rocket Software
    ------------------------------
    Lionel Dyck
    Participating Frequently
    Mar 8, 2021 9:35 AM UTC
    What if the sysprog used git to version control the config files and parmlib members... :) Infrastructure-as-code...

    ------------------------------
    Joern Thyssen
    Rocket Software
    ------------------------------
    that would be an interesting exercise.

    ------------------------------
    Lionel Dyck
    lbdyck
    ------------------------------
    Jorn Thyssen
    Rocketeer
    Mar 8, 2021 10:54 AM UTC
    that would be an interesting exercise.

    ------------------------------
    Lionel Dyck
    lbdyck
    ------------------------------
    I think long term it is a necessary exercise.

    The process should really be:
    1) Sysprog clones git repo 
    2) Sysprog changes ssh config file; git commit + git push
    3) Sysprog starts pipeline (maybe ansible playbook) to deploy updated config (in this case it should deploy to /etc/ssh and issue the kill to refresh the daemon)

    This is business-as-usual for developers and the sysprog is really just a infrastructure-developer :)

    ------------------------------
    Joern Thyssen
    Rocket Software
    ------------------------------
    Lionel Dyck
    Participating Frequently
    Mar 8, 2021 2:45 PM UTC
    I think long term it is a necessary exercise.

    The process should really be:
    1) Sysprog clones git repo 
    2) Sysprog changes ssh config file; git commit + git push
    3) Sysprog starts pipeline (maybe ansible playbook) to deploy updated config (in this case it should deploy to /etc/ssh and issue the kill to refresh the daemon)

    This is business-as-usual for developers and the sysprog is really just a infrastructure-developer :)

    ------------------------------
    Joern Thyssen
    Rocket Software
    ------------------------------
    I agree it would be worthy exercise. I would strong encourage the git clone repo to be a unique directory and not the production location for those files to prevent overlaying the production files ​with an update from another system that may not work on the local system.  I would like to see a 'read-only' repository which could reference the production ssh configs and other key files (perhaps most of /etc) that would add/commmit/push the updates but would not allow a pull.

    Just me being very cautious.

    ------------------------------
    Lionel Dyck
    lbdyck
    ------------------------------