Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>In this case, using openssh over putty was key.</p> <hr> <p>Original answer (tips for debugging)</p> <blockquote> <p>I can log in via ssh with the <code>git</code> user.</p> </blockquote> <p>That means this works:</p> <pre><code>ssh git@serverIp </code></pre> <p>You do have a <code>HOME</code> variable defined, and ssh public/private keys (<code>id_rsa</code> / <code>id_rsa.pub</code>) in <code>%HOME%/.ssh/</code>. </p> <p><a href="https://stackoverflow.com/a/13509396/6309">This question</a> suggests a different url:</p> <pre><code>git remote set-url test git@serverIp:/home/git/test.git </code></pre> <p>Make sure you did create your git repo as git (and not as root, when you created the git account, as in <a href="https://stackoverflow.com/q/15367016/6309">this question</a>).<br> <code>ssh git@serverIp "which git"</code> should return the path of the git executable.</p> <p>Check also that all parent directories have the relevant <code>x</code> (execute) bit set for the user <code>git</code> or the group <code>gitgroup</code>, running <code>ls -ld /home /home/git /home/git/test.git</code>.<br> Also, getting more info for a git command can be done with:</p> <ul> <li><code>git push --verbose</code><br> or:</li> <li><code>GIT_TRACE=2 git push test master</code></li> </ul> <p>If you have a private ssh key with a password, it would be best to first test those ssh commands with a private ssh key <em>not</em> password-protected, to see if the issue persists.<br> Or, you can keep that password-protected ssh key, but <a href="https://stackoverflow.com/a/11918742/6309">double-check your <code>.bashrc</code> as in this answer</a>.</p> <hr> <p>For any ssh connection issue (where git's password is needed), check:</p> <ul> <li><code>/var/log/auth.log</code>, </li> <li>an <a href="https://serverfault.com/questions/130482/how-to-check-sshd-log">sshd debug session</a></li> </ul> <hr> <p>In your case, since it works with <code>ssh git@serverIp</code> (interactive secure shell), but not with git (which opens a non-interactive secure shell), have a look at <a href="https://groups.google.com/forum/?fromgroups=#!topic/git-users/fdxAkWOTTC8" rel="nofollow noreferrer">this thread</a>, which references <a href="http://lists.apple.com/archives/macos-x-server/2008/Jun/msg00251.html" rel="nofollow noreferrer">this one</a>:</p> <blockquote> <p>When ssh is started with a commandline, a non-interactive non-login shell is started.<br> However...<code>bash</code> does not use <code>$BASH_ENV</code> in this case, so setting it in <code>~/.ssh/environment</code> (e.g. to <code>/etc/profile</code>) doesn't help.<br> What bash does is source <code>/etc/bashrc</code> and <code>~/.bashrc</code>. </p> </blockquote> <p>Make sure that <code>/etc/profile</code> does define the <a href="https://stackoverflow.com/a/15532349/6309">path for <code>git</code></a>, since a <a href="https://stackoverflow.com/a/15651459/6309">non-login account could be used here</a> (that seems to be the case here, since <code>ssh git@serverIp "which git"</code> worked, and <code>ssh git@serverIp "git --version"</code> should too).</p> <p>But check also the right issue, and test a <code>chmod 755</code> on <code>/home</code>, <code>/home/git</code> and <code>/home/git/test.git</code>.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload