使用ssh在Windows下克隆github.com的repo时,“no address associ
发布时间:2020-12-13 20:06:36 所属栏目:Windows 来源:网络整理
导读:Searching google for github ssh“no address associated with name”给出以下SO问题作为4个顶级结果: github no address associated with name Github push origin master not working Syncing with github GITHUB setup – no address associated with n
Searching google for github ssh“no address associated with name”给出以下SO问题作为4个顶级结果:
github no address associated with name 不过,他们都没有回答我的问题. c:Program Files (x86)Gitbin>git --version git version 1.7.7.1.msysgit.0 c:Program Files (x86)Gitbin>ssh git@github.com Enter passphrase for key '/c/Users/Piotr/.ssh/id_rsa': Hi piotr-dobrogost! You've successfully authenticated,but GitHub does not provide shell access. Connection to github.com closed. c:Program Files (x86)Gitbin>git clone ssh://git@github.com:piotr-dobrogost/requests.git Cloning into requests... ssh: github.com:piotr-dobrogost: no address associated with name fatal: The remote end hung up unexpectedly 我猜这个问题是由git传递github.com:piotr-dobrogost作为主机名为ssh,而不是github.com.为什么git这样做和解决方案是什么?
你自己回答了这个问题,问题是你将github.com:piotr-dobrogost传递给主机名,这实际上不是一个有效的主机名. git将了解存储库的正确URL或SCP格式的存储库路径(请参阅man 1 scp.)对于正确的URL,请尝试:
git clone ssh://git@github.com/piotr-dobrogost/requests.git 其中相当于以下SCP路径格式: git clone git@github.com:piotr-dobrogost/requests.git (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |