O clone funciona, o envio remoto não. Repositório remoto sobre copssh
Eu tenho "setup-a-msysgit-server-with-copssh-on-windows", seguindo Tim Davis 'guia e agora eu estava aprendendo a usar os comandos git, seguindo as instruções de Jason Meridthguia, e consegui fazer tudo funcionar bem, mas agora não posso passar o comando push.
Eu configurei o servidor e o cliente na mesma máquina (por enquanto), win7-x64.
Aqui estão algumas informações de como as coisas são configuradas:
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
Em '/SSH/home/rvc/.bashrc' e 'Users / 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}
Então, a clonagem funciona (tudo abaixo é feito via "Git Bash here": P):
rvc@RVC-DESKTOP /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.
rvc@RVC-DESKTOP /c/code
$ cd myapp
rvc@RVC-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)
Então eu crio um arquivo:
rvc@RVC-DESKTOP /c/code/myapp (master)
$ touch test.file
rvc@RVC-DESKTOP /c/code/myapp (master)
$ ls
test.file
Tente pressioná-lo e obtenha este erro:
rvc@RVC-DESKTOP /c/code/myapp (master)
$ git add test.file
rvc@RVC-DESKTOP /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
"git: '/SSH/home/rvc/myapp.git' não é um comando git. Veja 'git --help'." .. o que?!
EDITAR: RAAAGE !!
Estou tendo o mesmo problema novamente, mas agora com o ssh:
rvc@RVC-DESKTOP /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
Eu tentei empurrar GUI e mostra a mesma mensagem.
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
Aqui estão as correntes .bashrc:
C: \ Users \ rvc.bashrc (acho que isso é usado apenas pelo cygwin / git bash):
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 \ home \ rvc.bashrc (.. e isso é usado quando o git se conecta via ssh ao servidor "remoto"):
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}
EDIT 2: Algumas informações adicionais:
rvc@RVC-DESKTOP /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'.
EDIT 3:
rvc@RVC-DESKTOP /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
Isso fez o truque?
O git push está executando 'git-receive-pack' e deveria ser 'git receive-pack'?
Minha versão do git é 'git version 1.7.0.2.msysgit.0'