1

私のサーバー「ソースコード」で私は:

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 とパッケージがあります。

4

2 に答える 2

2

構成ファイルがある場合は、次を使用する必要があります。

git push sourcecode:/home/AyamJ/pbGIT master

その後、次を試してください。

GIT_TRACE=1 git push sourcecode:/home/AyamJ/pbGIT master

そして、「GIT: clone works, remote push doesn't. Remote repository over copssh
」をチェックしてください--receive-pack='git receive-pack'
または少なくとも、git config --global remote.origin.receivepack "git receive-pack".
そして、GIT_SSH変数が設定されているかどうかを確認します。

最新の Git リリースで試して、問題が解決しないかどうかを確認してください。

于 2012-11-22T06:47:24.347 に答える