在我的服务器“源代码”上,我这样做:
cd /home/AyamJ/pbGIT
git --bare init
在我的本地笔记本上,我这样做:
git push AyamJ@sourcecode:/home/AyamJ/pbGIT master
我得到了错误:
git:'/home/AyamJ/pbGIT' is not a git command. See 'git --help'
fatal: the remote end hung up enexpectedly
在我的 ~/.ssh/config
Host sourcecode
user AyamJ
port 31313
Host localhost
user Dell
port 22
为什么该路径由 git 解释?
== 更新 ==
我有 2 个服务器(通过 git --bare init)“localhost”和“sourcecode”
我做
GIT_TRACE=1 git push sourcecode:/home/AyamJ/pbGIT master
got
trace: built-in : git 'push' 'sourcecode:/home/AyamJ/pbGIT' 'master'
trace: run_command : 'ssh' 'sourcecode' 'git-receive-pack '\''/home/AyamJ/pbGIT'\'''
AyamJ@sourcecode's password:
git: '/home/AyamJ/pbGIT' is not a git command. See 'git --help'
fatal: The remote end hung up unexpectedly
和
GIT_TRACE=1 git push localhost:/home/Dell/pbGIT master
got
trace: built-in : git 'push' 'localhost:/home/Dell/pbGIT' 'master'
trace: run_command : 'ssh' 'localhost' 'git-receive-pack '\''/home/Dell/pbGIT'\'''
Dell@sourcecode's password:
Everything up-to-date
两个服务器都有类似的 cygwin 和包。