I've just initialized a GIT repo in an existing website root. I have a local development copy of this site, which is already a GIT repo. I can't just clone one from the other, as the local/live versions have fallen out of sync over the years.
I'm trying to get them lined back up with GIT again, but I want to be able to do a fetch on the live site and run git diff
My problem is, on the local site I've added the live site as a remote repo:
git remote add live [email protected]:/path/to/repo I can successfully log in via ssh to my server:
ssh [email protected] But when I try to fetch, and type in the ssh password, the command line just returns the password prompt, as if I've typed it wrong. But I know the password is correct, as I can use SSH to log in.
Do I have to specify ssh:// before my remote URL? Is there something I have to do to get ssh remote repos working
UPDATE
I've added the ssh:// prefix, but it's made no difference. This is how it looks in .git/config
[remote "live"] url = ssh://[email protected]/path/to/repo fetch = +refs/heads/*:refs/remotes/live/* Running GIT_TRACE=true git fetch live adds in the lines:
trace: run_command 'ssh' '[email protected]' 'git-upload-pack '\''/path/to/repo'\''' I have to type the password in 3 times before I get the message:
fatal: the remote end hung up unexpectedly
--bareflag. about the difference, you can read it from here: progit.org/book/ch4-2.html