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

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

  • origin websiteComparing WorkflowsCentralized Workflow Fea...
    伍帆阅读 3,496评论 0 0
  • Lesson 3: Using GitHub to Collaborate 3.1 Creating a GitH...
    赤乐君阅读 11,330评论 3 11
  • Spring Cloud为开发人员提供了快速构建分布式系统中一些常见模式的工具(例如配置管理,服务发现,断路器,智...
    卡卡罗2017阅读 136,147评论 19 139
  • 输入 y ,创建 git_hug 目录No githug directory found, do you wish...
    风花花阅读 6,182评论 0 4
  • 微商这两字不知道从什么时候成为了别人热议的话题,本来挺好的微信交流平台也不知道从什么时候成了别人刷广告,卖东西的利...
    妞姐阅读 3,584评论 0 0

友情链接更多精彩内容