我在Tim Davis的guide之后“setup-a-msysgit-server-with-copssh-on-windows”,我正在学习如何使用git命令,跟随Jason Meridth的guide,以及我设法让一切正常工作,但现在我无法通过push命令。GIT:克隆工程,远程推送不。远程存储库通过copssh
我已经将服务器和客户端设置在同一台机器上(现在),win7-x64。
这里的事情是如何设置的一些信息:
CopSSH Folder : C:/SSH/
Local Home Folder : C:/Users/rvc/
Remote Home Folder: C:/SSH/home/rvc/ # aka /cygdrive/c/SSH/home/rvc/
git remote rep : C:/SSH/home/rvc/myapp.git # empty rep
在 '/SSH/home/rvc/.bashrc' 和 '用户/ RVC/.bashrc中':
export HOME=/cygdrive/c/SSH/home/rvc
gitpath='/cygdrive/c/Program Files (x86)/Git/bin'
gitcorepath='/cygdrive/c/Program Files (x86)/Git/libexec/git-core'
PATH=${gitpath}:${gitcorepath}:${PATH}
因此,克隆作品(一切波纹管是通过 “混帐击这里” 做了:P):
[email protected] /c/code
$ git clone ssh://[email protected]:5858/SSH/home/rvc/myapp.git
Initialized empty Git repository in C:/code/myapp/.git/
warning: You appear to have cloned an empty repository.
[email protected] /c/code
$ cd myapp
[email protected]DESKTOP /c/code/myapp (master)
$ git remote -v
origin ssh://[email protected]:5858/SSH/home/rvc/myapp.git (fetch)
origin ssh://[email protected]:5858/SSH/home/rvc/myapp.git (push)
然后我创建了一个文件:
[email protected] /c/code/myapp (master)
$ touch test.file
[email protected] /c/code/myapp (master)
$ ls
test.file
努力推动,并得到这个错误:
[email protected] /c/code/myapp (master)
$ git add test.file
[email protected] /c/code/myapp (master)
$ GIT_TRACE=1 git push origin master
trace: built-in: git 'push' 'origin' 'master'
trace: run_command: 'C:\Users\rvc\bin\plink.exe' '-batch' '-P' '5858' '[email protected]
68.1.65' 'git-receive-pack '\''/SSH/home/rvc/myapp.git'\'''
git: '/SSH/home/rvc/myapp.git' is not a git command. See 'git --help'.
fatal: The remote end hung up unexpectedly
“混帐: '/SSH/home/rvc/myapp.git' 不是一个git命令。见 '的git --help'“..什么?
编辑: RAAAGE!
我再有同样的问题,但现在使用ssh:
[email protected] /c/code/myapp (master)
$ GIT_TRACE=1 git push
trace: built-in: git 'push'
trace: run_command: 'ssh' '-p' '5858' '[email protected]' 'git-receive-pack '\''/
SSH/home/rvc/myapp.git'\'''
git: '/SSH/home/rvc/myapp.git' is not a git command. See 'git --help'.
fatal: The remote end hung up unexpectedly
。
我试过GUI推,并显示了同样的信息
git: '/SSH/home/rvc/myapp.git' is not a git command. See 'git --help'.
Pushing to ssh://[email protected]:5858/SSH/home/rvc/myapp.git
fatal: The remote end hung up unexpectedly
这里的电流的.bashrc:
C:\用户\ rvc.bashrc(我想这只能由Cygwin的/ bash的git的使用):
export HOME=/c/SSH/home/rvc
gitpath='/c/Program Files (x86)/Git/bin'
gitcorepath='/c/Program Files (x86)/Git/libexec/git-core'
export GIT_EXEC_PATH=${gitcorepath}
PATH=${gitpath}:${gitcorepath}:${PATH}
C:\ SSH \家\ rvc.bashrc(..,这是用来当混帐通过ssh连接到 “远程” 服务器):
export HOME=/c/SSH/home/rvc
gitpath='/cygdrive/c/Program Files (x86)/Git/bin'
gitcorepath='/cygdrive/c/Program Files (x86)/Git/libexec/git-core'
export GIT_EXEC_PATH=${gitcorepath}
PATH=${gitpath}:${gitcorepath}:${PATH}
编辑2: 一些附加信息:
[email protected] /c/code/myapp (master)
$ ssh -p 5858 [email protected] git-receive-pack /SSH/home/rvc/myapp.git
git: '/SSH/home/rvc/myapp.git' is not a git command. See 'git --help'.
编辑3:
[email protected] /c/code/myapp (master)
$ git push --receive-pack='git receive-pack' ssh://[email protected]:5858/SSH/home/rvc/myapp.git --a
ll
Counting objects: 3, done.
Writing objects: 100% (3/3), 202 bytes, done.
Total 3 (delta 0), reused 0 (delta 0)
To ssh://[email protected]:5858/SSH/home/rvc/myapp.git
* [new branch] master -> master
有这并获得成功?
git push正在运行'git-receive-pack',它应该是'git receive-pack'?
我的git版本是'git version 1.7.0.2.msysgit。0'