So I have a DH-hosted domain where I'd like to keep all my git repos at git.mydomain.com, and git is installed on the server, as well as locally using msysgit on Windows. I'm using TortoiseGit, have put a putty generated key on my server so I can use ssh and initialized a bare git repository at myproj.git. However, when I try to clone a local version I keep getting this message and have no idea how to debug it or even how to understand it since I know that myproj.git is a git repository.
git.exe clone --progress -v "ssh://[email protected]/repos/myproj.git" "C:\repos\myproj"
Cloning into C:\repos\myproj...
fatal: 'repos/myproj.git' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
It asks me for my password at [email protected] so I know the key is working, or at least I think it is, so I'm just confused as to why I would be getting this message even though it is a git repos.
Thanks for the help!
If you are being asked for a password then the key is not working.
Where exactly is the repository located on the server? I'm guessing its located in your home directory which means the url you are using is wrong. Try
git clone ssh://[email protected]/home/user/repos/myproj.git
orgit clone [email protected]:repos/myproj.git
.Also with msysgit it's recommended to use the Git-Bash console instead of running git.exe directly.