I am trying to get GIT to work fully in my beloved TakeCommand command-line window on Windows 7.
I installed msysgit v.1.7.3, created my SSH keys and all, and in GIT Bash, everything works just fine and dandy.
But I always have my TakeCommand windows open anyway – so I really don’t want Yet Another Command Line Window just for GIT.
Most commands like git status, git add, git commit and so forth work just fine in TakeCommand – the only thing that doesn’t work is pull and push.
I have setup a ~/.ssh/config file that points to my company’s central repo, and in Git Bash, everything works just fine. But in TakeCommand, I get:
D:\myGitProject> git pull "origin" master:master
ssh: gerrit: no address associated with name
fatal: The remote end hung up unexpectedly
WTF?!?!? Same with git push – what’s going on here?? My SSH is set up, Git Bash works, the ~/.ssh/config file is there and accessible – I’m at a loss…..
Any brilliant ideas? I sure hope so!!
Update: for @Mark Longair – here’s my ~/.ssh/config file – slightly edited 🙂
Host gerrit
Hostname git.mycompany.com
Port 29418
User myself
IdentityFile ~/.ssh/gerrit_myself_rsa
I can ping git.mycompany.com, but I cannot ping gerrit. Any ideas? Should I add an entry for gerrit into my hosts file and point it to the same IP as the git server here??
To answer your question at the end, you could add
gerritto your hosts file, but that wouldn’t let you customize the port, and doesn’t help to understand the problem – specifying a nickname for the host in your SSH config should work!My suspicion is that the
~/.ssh/configfile isn’t being read at all, possibly because SSH is looking in a different location for it. To test this, just try:That should just produce the same error. Then, to get more information, try:
If it’s working successfully, the output should begin something like the following:
(That’s from Linux, but it should be similar from the OpenSSH client bundled with msysgit.) If you don’t see the “Reading configuration data [your config file]” line then that’s likely to be the problem.
Can you successfully connect with:
… incidentally?
The other thing that I would check is what
HOMEis set to at the command prompt.