I am trying to set up a git repo on my test server when I try to push from my windows computer
git push ssh://git@server.com:/path/.git
I get the error
fatal: The remote end hung up unexpectedly
But when I ssh'd into my server and tried to do the the exact same command it worked just fine. Is this a problem with my git setup or with my windows setup
The problem might be caused by a number of issues:
git
uses SSH to spawn remote git
instance it still spawns the default (for the user) shell on the server. plink.exe
to access the server, and it asks you to accept the host's key by entering "y" or "n" (which you can't do). In any case, try these steps:
plink.exe git@server.com "git --version"
and see it's able to run Git on the server at all. If you don't use plink.exe
use whatever binary is shipped with OpenSSH included with Git for Windows; probably it's ssh.exe
. Export GIT_TRACE=1
before running git push
and see if it prints out anything hinting at what went wrong, like this:
C:\\foo>GIT_TRACE=1 C:\\foo>git push ssh://git@server.com:/path/.git
我怀疑问题是用户'git'没有对远程存储库的写访问权限,并且您可能使用自己的用户名(cemurray或其他类似用户)手动连接。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.