[ale] Error with git clone, pull, or push while in screen and SSH'd into a server

Erik Reinertsen erikrtn at gmail.com
Thu Sep 22 13:24:38 EDT 2016


Hello Linux masters,

Jim Kinney suggested I post my question here.

I am trying to sync code between a cluster, local machines, and
collaborators via Git (stored in GitHub).

I use screen because some of the computation we do takes a while, and for
other reasons.

However, I am unable to git clone, pull, or push while in screen.

Here I SSH into the server, create a screen instance, and attempt to clone
a repo:


$ ssh -X username at serveraddress

$ screen -S instance1

$ screen -ls
There is a screen on:
        36710.instance1 (Attached)
1 Socket in /var/run/screen/S-username.

$ git clone git at github.com:mygithubname/testrepo.git
Cloning into 'testrepo'...
bash: No such file or directory
ssh_exchange_identification: Connection closed by remote host
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.


so I ctrl-A, ctrl-D to exit screen, and can clone my repo without issue:


[detached from 36710.instance1]

$ git clone git at github.com:mygithubname/testrepo.git
Cloning into 'testrepo'...
remote: Counting objects: 48, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 48 (delta 0), reused 0 (delta 0), pack-reused 45
Receiving objects: 100% (48/48), 137.11 KiB | 0 bytes/s, done.
Resolving deltas: 100% (6/6), done.


if I go back into screen, I cannot pull changes or push commits to the repo:


$ screen -r 36710.instance1

$ cd testrepo

$ touch test.txt

$ git status
# On branch master
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
# test.txt
nothing added to commit but untracked files present (use "git add" to track)

$ git add -A

$ git commit -m "adding a test file to see if I can push commits in screen"
[master 130da0b] adding a test file to see if I can push commits in screen
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 test.txt

$ git push
bash: No such file or directory
ssh_exchange_identification: Connection closed by remote host
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.


Similar error if I try git pull while in screen.

Any suggestions? Thanks.



Erik Reinertsen
MD/PhD student | Clifford Lab <http://gdclifford.info/>
Georgia Institute of Technology
Emory University School of Medicine
@erikrtn <https://twitter.com/erikrtn> | erikrtn at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ale.org/pipermail/ale/attachments/20160922/d1b9ac67/attachment.html>


More information about the Ale mailing list