1

I previously had the problem My Problem in stackoverflow Question and that is solved by the answer provided by our stackoverflow community member.

Now i tried to use ssh for cloning one of the protected repository in Windows 7, so first i created the public key using this url link .

everything is working for me as specified in the url after following the steps, except when i try to do the 4th step that is "$ ssh -T git@github.com" i got the following error

mohamed_hussain@18 ~/.ssh 
$ ssh -T -p 443 git@ssh.github.com 
ssh: ssh.github.com: no address associated with name

Please help me in connecting to the ssh to access the private repositories.

Community
  • 1
  • 1
Mohamed Hussain
  • 7,433
  • 14
  • 55
  • 85

1 Answers1

2

You need to use for step 4:

ssh -T git@github.com

(not ssh -T git@ssh.github.com: ssh.github.com doesn't exist)


If the error message persists:

It shouldn't be an ~/.ssh/config issue, since you are not using an SCP syntax.


Considering that the OP Mohamed Hussain are trying to ssh to a private server (and not github.com), the OP confirms:

the problem here is my network firewall is blocking the IP and port number 22.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Thanks For the help, but GITBASH still gives me the same reply that is mohamed_hussain@18 ~/.ssh $ ssh -T git@github.com ssh: github.com: no address associated with name – Mohamed Hussain Jun 20 '13 at 18:26
  • Thanks For the help. I checked and i am able to clone the angular js repository which is the public repository. – Mohamed Hussain Jun 20 '13 at 18:56
  • my internet connection is also good. and i got this message when i try to clone the desired repository using htps instead of ssh i got the following message" $ git clone https://git@err-pop.it.mutr.com/my-prototype.git -b sandbox30 Cloning into 'my-prototype'... error: The requested URL returned error: 503 while accessing https://git@err-pop.it.mutr.com/my-prototype.git/info/refs?service=git-upload-pack fatal: HTTP request failed" – Mohamed Hussain Jun 20 '13 at 18:57
  • @MohamedHussain but where github comes in the picture, since you are trying ssh or https on the `err-pop.it.mutr.com` server? (not `github.com` server) – VonC Jun 20 '13 at 18:58
  • first i created the public and shared with the repository owner of err-pop.it.mutr.com. To set up the public key and to share with the owner repository i followed those steps in the https://help.github.com/articles/generating-ssh-keys . In that i got struck in 4 th step. and i am not able to clone the repository also. so i thought my 4th step problem is the one which is affecting me. – Mohamed Hussain Jun 21 '13 at 06:01
  • 1
    @MohamedHussain I understand, but step 4 is for checking if the public key has been published to github and ssh access *to github* is working. In your case, you would need to perform a similar test, but to `err-pop.it.mutr.com`, not github, which means you need to make sure your public key has been added to the `err-pop.it.mutr.com:~git/.ssh/authorized_keys` file (that you don't see at all in GitHub, since GitHub will mask that entirely from the client). – VonC Jun 21 '13 at 06:09
  • Thanks a lot again, i tried the step in another machine, which is in different network. In that machine the 4th step is working well and i got the desired result mentioned there. What are the things i needed to share with repository owner of "git@err-pop.it.mutr.com/my-prototype.git" to get the access. He asked me two things one is public key that i shared already and he asked userid also. here userid is what? – Mohamed Hussain Jun 21 '13 at 11:05
  • Whay ssh access check is not working in one of my machine . is it because of firewall?. do i need to modify anything to make it work? shall i move the discussion to chat? – Mohamed Hussain Jun 21 '13 at 11:08
  • let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/32152/discussion-between-vonc-and-mohamed-hussain) – VonC Jun 21 '13 at 12:37
  • @MohamedHussain sorry, I got back from holidays today, and I don't have access to chat at work. – VonC Jun 24 '13 at 08:45
  • Thanks for helping me in this, i am new to this GITHUB world. I am back to work after the weekend that's why i didn't respond to ur reply. but when i clone the angular tutorial (google's framework) repository using "git clone git://github.com/angular/angular-phonecat.git" i need to replace the above code with https like "git clone github.com/angular/…; then only it is working. is that cause any problem to this access issue ? – Mohamed Hussain Jun 24 '13 at 09:07
  • @MohamedHussain yes, using `https://` is recommended here. The git protocol is generally blocked. – VonC Jun 24 '13 at 09:21
  • I contacted the owner of that project, he told me that their project git which i want to clone is on the internally hosted GIT server which they are having and he told me also that he added my public key for accessing the repository and he told me that i am having some network problem, but when i ping the host IP, it working for me – Mohamed Hussain Jun 24 '13 at 10:34
  • @MohamedHussain but you mentioned just before a project on github. So which project do you actually want to clone? If it is on an internal server, and an admin add your public key, then you can clone it with `ssh://` url (not https or git). – VonC Jun 24 '13 at 10:36
  • but i am not able to clone using ssh/https/git, using the following comment in GITBASH "git clone ssh://git@err-pop.it.mutr.com/my-prototype.git" i got the following result in GITBASH as "Cloning into 'my-prototype'... ssh: git@err-pop.it.mutr.com: no address associated with name fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists." – Mohamed Hussain Jun 24 '13 at 11:28
  • @MohamedHussain ok (still not sure why "github" was ever mentioned here). Can you ping `err-pop.it.mutr.com`? – VonC Jun 24 '13 at 11:31
  • when i ping with IP of the err-pop.it.mutr.com i found it is accessible from my machine. – Mohamed Hussain Jun 24 '13 at 11:32
  • But when i pinged err-pop.it.mutr.com by just typing it, i got the following thing "Ping request could not find host err-pop.it.mutr.com. Please check the name and try again." – Mohamed Hussain Jun 24 '13 at 11:35
  • @MohamedHussain that is a good start. You then need to ask for the `err-pop.it.mutr.com` to open an `sshd -d` session in order to record your ssh query (as in http://stackoverflow.com/a/12680114/6309). If it detects nothing, then it is an issue only on the client side. – VonC Jun 24 '13 at 11:35
  • @MohamedHussain you can also try to clone using the ip of `err-pop.it.mutr.com`: `git clone ssh://git@123.456.xxx.yyy/my-prototype.git` – VonC Jun 24 '13 at 11:36
  • as i am a newbie to this, i might ask u silly questions, sorry for that. I thought initially GITHUB has connection with GIT BASH. so that only confused me and i mentioned earlier. – Mohamed Hussain Jun 24 '13 at 11:37
  • 1
    @MohamedHussain no problem. I confirm github isn't related to your issue here. Try and clone using the IP address to see if that works better. – VonC Jun 24 '13 at 11:38
  • I tried to resolve the IP address to check that whether that IP matches my err-pop.it.mutr.com and vice versa but both the things failed. But i asked the repository owner to share the IP of the server they hosted and they also shared, when i ping that IP that ping is going back and response is fine from the server in that IP shared by them. what is git here "git@err-pop.it.mutr.com" – Mohamed Hussain Jun 24 '13 at 11:47
  • when i try to find the host name from the IP shared by them it points to the DNS naming server of the site instead of err-pop.it.mutr.com. – Mohamed Hussain Jun 24 '13 at 11:52
  • 1
    @MohamedHussain without trying to resolve the ip, would a `git clone ssh://git@xxx.xxx.xxx.xxx/my-prototype.git` work? (with `xxx.xxx.xxx.xxx` being the ip address of `err-pop.it.mutr.com`) – VonC Jun 24 '13 at 13:21
  • Thanks a lot for ur help VonC. I will update once i got any clue on the issue.now i am working with the group owner to solve this issue. – Mohamed Hussain Jun 24 '13 at 14:08
  • 1
    @MohamedHussain sure: trying an `sshd -d` on the server can help to see how your ssh request is interpreted. – VonC Jun 24 '13 at 14:12
  • what is the exact comment to run on server. is it "sshd -d" as u mentioned. Server means, here the machine where the repository is there right? – Mohamed Hussain Jun 24 '13 at 14:14
  • @MohamedHussain yes, the admin or your remote server '`err-pop.it.mutr.com`' must run this command: see http://serverfault.com/a/130496/783. – VonC Jun 24 '13 at 14:15
  • i contacted the repository owner. he told me that no IP is blocking in server and he told me that some firewall in my work network is blocking that SSH.... – Mohamed Hussain Jun 24 '13 at 14:59
  • @MohamedHussain that entirely is possible. Does your admin provide https access? – VonC Jun 24 '13 at 15:01
  • @MohamedHussain more the repo owner who knows how git is installed and managed on `err-pop.it.mutr.com`. – VonC Jun 24 '13 at 15:03
  • I found the Cause for the problem with all the helps i got from the owner and u. the problem here is my network firewall is blocking the IP and port number 22. Thanks for all the help VonC – Mohamed Hussain Jun 25 '13 at 06:30
  • @MohamedHussain Excellent. I have edited the answer for more visibility, in order to reflect that conclusion. – VonC Jun 25 '13 at 06:33
  • one Doubt for me, here in the following command "git@ssh.github.com " git@ means the user name is git? – Mohamed Hussain Jun 25 '13 at 07:17
  • @MohamedHussain yes, '`git`' is the user account used for opening an, ssh session on the remote server. But, as I mentioned in my answer, `ssh.github.com` doesn't exist (plus it has no bearing at all for your current setup, where you don't contact github at all) – VonC Jun 25 '13 at 07:19