<div dir="ltr">Really good call on Mr. Sumners part. I'd look 'specially for GIT* variables. A cursory check of the man page shows GIT_DIR,GIT_WORK_TREE,GIT_NAMESPACE.<div><br></div><div>I tend to keep my environment in ${HOME}/.envfile to ensure it stays the same across all shells in the login.</div><div><br></div><div>-- CHS</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Sep 22, 2016 at 1:54 PM, James Sumners <span dir="ltr"><<a href="mailto:james.sumners@gmail.com" target="_blank">james.sumners@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Compare the output of `env` in each case.</div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Thu, Sep 22, 2016 at 1:24 PM, Erik Reinertsen <span dir="ltr"><<a href="mailto:erikrtn@gmail.com" target="_blank">erikrtn@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><div>Hello Linux masters,</div><div><br></div><div>Jim Kinney suggested I post my question here.<br></div><div><br></div><div>I am trying to sync code between a cluster, local machines, and collaborators via Git (stored in GitHub).</div><div><br></div><div>I use screen because some of the computation we do takes a while, and for other reasons.</div><div><br></div><div>However, I am unable to <font face="monospace, monospace">git clone, pull, </font>or<font face="monospace, monospace"> push</font> while in screen.</div><div><br></div><div>Here I SSH into the server, create a screen instance, and attempt to clone a repo:</div><div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace" color="#0b5394"><br></font></div><div><font face="monospace, monospace" color="#0b5394" style="background-color:rgb(238,238,238)">$ ssh -X username@serveraddress</font></div><div><font face="monospace, monospace" color="#0b5394" style="background-color:rgb(238,238,238)"><br></font></div><div><font face="monospace, monospace" color="#0b5394" style="background-color:rgb(238,238,238)">$ screen -S instance1</font></div><div><font face="monospace, monospace" color="#0b5394" style="background-color:rgb(238,238,238)"><br></font></div><div><font face="monospace, monospace" color="#0b5394" style="background-color:rgb(238,238,238)">$ screen -ls</font></div><div><font face="monospace, monospace" color="#0b5394" style="background-color:rgb(238,238,238)">There is a screen on:</font></div><div><font face="monospace, monospace" color="#0b5394" style="background-color:rgb(238,238,238)"> 36710.instance1 (Attached)</font></div><div><font face="monospace, monospace" color="#0b5394" style="background-color:rgb(238,238,238)">1 Socket in /var/run/screen/S-username.</font></div><div><font face="monospace, monospace" color="#0b5394" style="background-color:rgb(238,238,238)"><br></font></div><div><div><font face="monospace, monospace" color="#0b5394" style="background-color:rgb(238,238,238)">$ git clone git@github.com:mygithubname/te<wbr>strepo.git</font></div><div><font face="monospace, monospace" color="#0b5394" style="background-color:rgb(238,238,238)">Cloning into 'testrepo'...</font></div><div><font face="monospace, monospace" color="#0b5394" style="background-color:rgb(238,238,238)">bash: No such file or directory</font></div><div><font face="monospace, monospace" color="#0b5394" style="background-color:rgb(238,238,238)">ssh_exchange_identification: Connection closed by remote host</font></div><div><font face="monospace, monospace" color="#0b5394" style="background-color:rgb(238,238,238)">fatal: Could not read from remote repository.</font></div><div><font face="monospace, monospace" color="#0b5394" style="background-color:rgb(238,238,238)"><br></font></div><div><font face="monospace, monospace" color="#0b5394" style="background-color:rgb(238,238,238)">Please make sure you have the correct access rights</font></div><div><font face="monospace, monospace" color="#0b5394" style="background-color:rgb(238,238,238)">and the repository exists.</font></div></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace"><br></font></div><div><font face="arial, helvetica, sans-serif">so I ctrl-A, ctrl-D to exit screen, and can clone my repo without issue:</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace" style="background-color:rgb(238,238,238)"><br></font></div><div><font face="monospace, monospace" color="#0b5394" style="background-color:rgb(238,238,238)">[detached from 36710.instance1]<br></font></div><div><font face="monospace, monospace" color="#0b5394" style="background-color:rgb(238,238,238)"><br></font></div><div><div><font face="monospace, monospace" color="#0b5394" style="background-color:rgb(238,238,238)">$ git clone git@github.com:mygithubname/te<wbr>strepo.git<br></font></div><div><font face="monospace, monospace" color="#0b5394" style="background-color:rgb(238,238,238)">Cloning into 'testrepo'...</font></div><div><font face="monospace, monospace" color="#0b5394" style="background-color:rgb(238,238,238)">remote: Counting objects: 48, done.</font></div><div><font face="monospace, monospace" color="#0b5394" style="background-color:rgb(238,238,238)">remote: Compressing objects: 100% (3/3), done.</font></div><div><font face="monospace, monospace" color="#0b5394" style="background-color:rgb(238,238,238)">remote: Total 48 (delta 0), reused 0 (delta 0), pack-reused 45</font></div><div><font face="monospace, monospace" color="#0b5394" style="background-color:rgb(238,238,238)">Receiving objects: 100% (48/48), 137.11 KiB | 0 bytes/s, done.</font></div><div><font face="monospace, monospace" color="#0b5394" style="background-color:rgb(238,238,238)">Resolving deltas: 100% (6/6), done.</font></div></div><div><br></div><div><br></div><div>if I go back into screen, I cannot pull changes or push commits to the repo:</div><div><b><br></b></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace" color="#0b5394" style="background-color:rgb(238,238,238)">$ screen -r 36710.instance1<br></font></div><div><font face="monospace, monospace" color="#0b5394" style="background-color:rgb(238,238,238)"><br></font></div><div><font face="monospace, monospace" color="#0b5394" style="background-color:rgb(238,238,238)">$ cd testrepo</font></div><div><font face="monospace, monospace" color="#0b5394" style="background-color:rgb(238,238,238)"><br></font></div><div><font face="monospace, monospace" color="#0b5394" style="background-color:rgb(238,238,238)">$ touch test.txt</font></div><div><font face="monospace, monospace" color="#0b5394" style="background-color:rgb(238,238,238)"><br></font></div><div><font face="monospace, monospace" color="#0b5394" style="background-color:rgb(238,238,238)">$ git status</font></div><div><font face="monospace, monospace" color="#0b5394" style="background-color:rgb(238,238,238)"># On branch master</font></div><div><font face="monospace, monospace" color="#0b5394" style="background-color:rgb(238,238,238)"># Untracked files:</font></div><div><font face="monospace, monospace" color="#0b5394" style="background-color:rgb(238,238,238)"># (use "git add <file>..." to include in what will be committed)</font></div><div><font face="monospace, monospace" color="#0b5394" style="background-color:rgb(238,238,238)">#</font></div><div><font face="monospace, monospace" color="#0b5394" style="background-color:rgb(238,238,238)">#<span style="white-space:pre-wrap">        </span>test.txt</font></div><div><font face="monospace, monospace" color="#0b5394" style="background-color:rgb(238,238,238)">nothing added to commit but untracked files present (use "git add" to track)</font></div><div><font face="monospace, monospace" color="#0b5394" style="background-color:rgb(238,238,238)"><br></font></div><div><div><font face="monospace, monospace" color="#0b5394" style="background-color:rgb(238,238,238)">$ git add -A</font></div><div><font face="monospace, monospace" color="#0b5394" style="background-color:rgb(238,238,238)"><br></font></div><div><font face="monospace, monospace" color="#0b5394" style="background-color:rgb(238,238,238)">$ git commit -m "adding a test file to see if I can push commits in screen"</font></div><div><font face="monospace, monospace" color="#0b5394" style="background-color:rgb(238,238,238)">[master 130da0b] adding a test file to see if I can push commits in screen</font></div><div><font face="monospace, monospace" color="#0b5394" style="background-color:rgb(238,238,238)"> 1 file changed, 0 insertions(+), 0 deletions(-)</font></div><div><font face="monospace, monospace" color="#0b5394" style="background-color:rgb(238,238,238)"> create mode 100644 test.txt</font></div></div><div><font face="monospace, monospace" color="#0b5394" style="background-color:rgb(238,238,238)"><br></font></div><div><font face="monospace, monospace" color="#0b5394" style="background-color:rgb(238,238,238)">$ git push</font></div><div><font face="monospace, monospace" color="#0b5394" style="background-color:rgb(238,238,238)">bash: No such file or directory</font></div><div><font face="monospace, monospace" color="#0b5394" style="background-color:rgb(238,238,238)">ssh_exchange_identification: Connection closed by remote host</font></div><div><font face="monospace, monospace" color="#0b5394" style="background-color:rgb(238,238,238)">fatal: Could not read from remote repository.</font></div><div><font face="monospace, monospace" color="#0b5394" style="background-color:rgb(238,238,238)"><br></font></div><div><font face="monospace, monospace" color="#0b5394" style="background-color:rgb(238,238,238)">Please make sure you have the correct access rights</font></div><div><font face="monospace, monospace" color="#0b5394" style="background-color:rgb(238,238,238)">and the repository exists.</font></div><div><br></div><div><br></div><div>Similar error if I try <font face="monospace, monospace">git pull </font>while in screen.</div><div><br></div><div>Any suggestions? Thanks.</div><span><font color="#888888"><div><b><br></b></div><div><b><br></b></div><div><div><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><div style="font-size:12.8px"><div style="color:rgb(34,34,34)"><font face="HelveticaNeue"><span style="color:rgb(153,153,153)"><br></span></font></div><div><font face="HelveticaNeue" color="#999999">Erik Reinertsen<br></font></div><div><font face="HelveticaNeue"><font color="#999999">MD/PhD student | </font><a href="http://gdclifford.info/" style="color:rgb(85,172,238);text-decoration:none" target="_blank">Clifford Lab</a></font></div><div><div><font face="HelveticaNeue" color="#999999">Georgia Institute of Technology<br></font><div><font face="HelveticaNeue" color="#999999">Emory University School of Medicine</font></div></div></div><div style="color:rgb(34,34,34)"><font face="HelveticaNeue"><a href="https://twitter.com/erikrtn" style="color:rgb(85,172,238);text-decoration:none" target="_blank">@erikrtn</a> <span style="color:rgb(153,153,153)">| </span><a href="mailto:erikrtn@gmail.com" style="color:rgb(85,172,238);text-decoration:none" target="_blank">erikrtn@gmail.com</a></font></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
</div></font></span></div></div>
<br></div></div>______________________________<wbr>_________________<br>
Ale mailing list<br>
<a href="mailto:Ale@ale.org" target="_blank">Ale@ale.org</a><br>
<a href="http://mail.ale.org/mailman/listinfo/ale" rel="noreferrer" target="_blank">http://mail.ale.org/mailman/li<wbr>stinfo/ale</a><br>
See JOBS, ANNOUNCE and SCHOOLS lists at<br>
<a href="http://mail.ale.org/mailman/listinfo" rel="noreferrer" target="_blank">http://mail.ale.org/mailman/li<wbr>stinfo</a><br>
<br></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div data-smartmail="gmail_signature">James Sumners<br><a href="http://james.sumners.info/" target="_blank">http://james.sumners.info/</a> (technical profile)<br><a href="http://jrfom.com/" target="_blank">http://jrfom.com/</a> (personal site)<br><a href="http://haplo.bandcamp.com/" target="_blank">http://haplo.bandcamp.com/</a> (music)</div>
</font></span></div>
<br>______________________________<wbr>_________________<br>
Ale mailing list<br>
<a href="mailto:Ale@ale.org">Ale@ale.org</a><br>
<a href="http://mail.ale.org/mailman/listinfo/ale" rel="noreferrer" target="_blank">http://mail.ale.org/mailman/<wbr>listinfo/ale</a><br>
See JOBS, ANNOUNCE and SCHOOLS lists at<br>
<a href="http://mail.ale.org/mailman/listinfo" rel="noreferrer" target="_blank">http://mail.ale.org/mailman/<wbr>listinfo</a><br>
<br></blockquote></div><br></div>