我无法克隆一个Git存储库,并得到这个错误:
krishna.soni@KRISHNACHANDRAS /c/Projects $ git clone http://stage.abc.com:10088/pqr
http://<url>/<repository> Cloning into '<repository>'... fatal: could not read Username for 'http://<url>': No such file or directory
我读过Bitbucket, Windows和“致命:无法读取密码”,但仍然有问题。
我继续前进,但现在得到这个错误
sh.exe": chown: command not found
krishna.soni@KRISHNACHANDRAS /c
$ git clone ssh://krishna.sonipayu.in@stage.payupaisa.
/projects
Cloning into 'C:/projects'...
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
> krishna.soni@KRISHNACHANDRAS /c
> $ git clone ssh:<url>
> ts
> Cloning into 'C:/projects'...
> Permission denied (publickey).
> fatal: Could not read from remote repository.
Please make sure you have the correct access rights
并且存储库存在。
修复hub cli工具:
Git配置—全局中心。协议HTTPS长期
git远程添加OOPS https://github.com/isomorphisms/go.git && git推送OOPS立即修复
此错误发生在hub命令行工具上,因为它们的默认hub错误。协议git-config值。他们设置了回购
git://github.com/schacon/ticgit.git
而不是github实际接受的,即https://github.com/schacon/ticgit.git。
阅读LESS=+/“HTTPS代替”man hub将解释上述“长期修复”命令的来源。
修复hub cli工具:
Git配置—全局中心。协议HTTPS长期
git远程添加OOPS https://github.com/isomorphisms/go.git && git推送OOPS立即修复
此错误发生在hub命令行工具上,因为它们的默认hub错误。协议git-config值。他们设置了回购
git://github.com/schacon/ticgit.git
而不是github实际接受的,即https://github.com/schacon/ticgit.git。
阅读LESS=+/“HTTPS代替”man hub将解释上述“长期修复”命令的来源。
macOS / Linux (Ubuntu):
1. 要进行身份验证,您需要从您的用户设置中将您的SSH密钥对的公共部分添加到bitbucket:用户设置——> SSH密钥
你可以在你的~/中找到上述公共部分。SSH目录,通常为id_rsa。酒吧。注意文件名的.pub部分为Public。
如果你还没有,它会帮助你生成一个
你还没有完成…
2. 您需要让系统知道对哪个远程主机使用哪个键,因此将这些行添加到~/中。ssh / config文件
Host bitbucket.org
IdentityFile ~/.ssh/PRIVATE_KEY_FILE_NAME
其中PRIVATE_KEY_FILE_NAME是您的SSH密钥对的私有部分的名称,如果您没有乱动它,通常它的默认名称是:id_rsa
在这种情况下,将上面的PRIVATE_KEY_FILE_NAME替换为id_rsa(私钥没有.pub扩展名)