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

DJ-Pfulio DJPfulio at jdpfu.com
Thu Sep 22 14:44:24 EDT 2016


BTW, I don't use github, but have been using an internal git repo I
created for a few years.

https://stackoverflow.com/questions/2505096/cloning-a-private-github-repo
- 2nd answer?

Just can't imagine any reason for ssh and screen to cause issues with
github access.


On 09/22/2016 01:24 PM, Erik Reinertsen wrote:
> 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.
> *


More information about the Ale mailing list