git port problem

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://git@pie6.rtp.lab.emc.com/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://git@pie6.rtp.lab.emc.com: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://git@pie6.rtp.lab.emc.com/~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

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

  • origin websiteComparing WorkflowsCentralized Workflow Fea...
    伍帆閱讀 572評論 0 0
  • Lesson 3: Using GitHub to Collaborate 3.1 Creating a GitH...
    赤樂君閱讀 6,344評論 3 11
  • Spring Cloud為開發(fā)人員提供了快速構(gòu)建分布式系統(tǒng)中一些常見模式的工具(例如配置管理,服務(wù)發(fā)現(xiàn),斷路器,智...
    卡卡羅2017閱讀 136,551評論 19 139
  • 輸入 y ,創(chuàng)建 git_hug 目錄No githug directory found, do you wish...
    風花花閱讀 2,116評論 0 4
  • 微商這兩字不知道從什么時候成為了別人熱議的話題,本來挺好的微信交流平臺也不知道從什么時候成了別人刷廣告,賣東西的利...
    妞姐閱讀 601評論 0 0

友情鏈接更多精彩內(nèi)容