Trying to use the git clone
command. My understanding (please correct if wrong) was that in order to host a Git repository you just need a machine running ssh and the project/repository sitting on it in a permitted location.
I have my git repository on an OS X system that's running ssh. I'm trying to clone it on a Windows XP system. I have Git Bash installed on the XP machine. In the Git bash (MINGW) console, I can ssh into the Mac no problem.
However, git clone
fails...
$ git clone username@host:~/project/path/contactdb Initialized empty Git repository in c:/Documents and Settings/Administrator/My Documents/projects/contactdb/.git/ bash: git-upload-pack: command not found fatal: The remote end hung up unexpectedly
Tried it with and without .git
extension:
$ git clone username@host:~/project/path/contactdb $ git clone username@host:~/project/path/contactdb.git
Do I need something else installed on the Mac?
If you have a problem cloning a repository, or using it once it has been created, check the following: Ensure that the user has gone through initial GitCentric login and has the correct username, email, and ssh. This should return a usage message that refers to the config-branch, config-repo, and ls-repo commands.
You need to have Git installed on the machine that has Git repository you want to clone; also git-upload-pack
has to be in $PATH on remote machine when doing ssh. Do you get something like the following response when directly ssh-ing to remote machine:
$ ssh username@host git-upload-pack --help usage: git upload-pack [--strict] [--timeout=nn] <dir>
or the following (wrong) response:
$ ssh username@host git-upload-pack --help bash: git-upload-pack: command not found
(of course name of shell depends on what remote side is using).
What also might be problem (although perhaps not in your case) is having misconfigured remote machine so that uses interactive shell for ssh connection, either giving some messages on connection, or setting interactive variables like infamous $CDPATH environmental variable.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With