During two day,when I use the git. Frank,Jason and me,we meet one problem.
When we clone theremote git repository to our local virtual machine. There is a error:
$git clone ssh://[email protected]/taf.solutions.git
ssh:connect to host pie6.rtp.lab.emc.com port 22:bad file number.
After we change the url it is clone right.
$git clone ssh://[email protected]:389/taf.solutions.git
Then at I change my local repository to remote git repository ,I meet this problem again
git remote add origin ssh://[email protected]/~yinl1/mytest.git
git push -u origin master
ssh:connect to host pie6.rtp.lab.emc.com port 22:bad file number.
After find some materials ,there is one method can solve it .
Open the “ .ssh” in you computer,there should have one file named “known_hosts”,it’s contents:
[pie6.rtp.lab.emc.com]:389,[128.222.14.156]:389 ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCVkNmCj1RACQDIrwQQqHZ+XCIxgcmGavLKJu3aO505kq86PPGXo9icHgrrTrtY/5MDafrW49YXlDG1jaDjAH+8IUOimQGVC+Q4HjcDRr6Q1D7t+30F0dhBvwFTB6Gt1hhjfSREaWz1PR0mW9wHTGN2ChmnLSLKx55SKJ5gLIWOP0RwHPFvWwAzO7tOOM3NEHffg7HzpNAMwUxxBgW4kONlZUJodWvInKs1TWXvvtqF7wABOCvxWQtw9KSrc3jeRdcK0HtAP3xhKrX7KGl2o9BW6OIFjtFXqy5CTtqavbg6jhe09KSTH8aK5CwluQCRdGuwlmQgLLyIUh+dLjaWhO1P
We can see the port is 389. So at this path create one file named “config” ,it’s content set :
Host pie6.rtp.lab.emc.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa
Port 389