我无法克隆一个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
并且存储库存在。
我得到了错误…
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
...当我的笔记本电脑因为Windows 10的错误更新而死机并被返回出厂设置后,我试图通过Git Bash提示与Bitbucket进行联系。我已经从备份中恢复了所有的ssh文件。
错误的原因原来是在电脑重建后,我的Windows帐户名不匹配。我了解到公钥文件id_rsa。pub以一个易于阅读的字符串结束,它包括我的Windows帐户名,后面跟着@符号,然后是计算机名。
当我最初设置我的电脑时,我创建了我的Windows帐户名,其中包括我的中间首字母,但当我的电脑重置为出厂设置时,我们新的DevOps人员创建了我的帐户名,其中没有我的中间首字母。
为了解决这个问题,我简单地编辑了我的公钥文件id_rsa。把我名字中间的首字母去掉了。我坚持使用相同的计算机名,所以没关系。我将文件内容复制到Windows剪贴板。然后我登录到Bitbucket,在我的头像下进入Bitbucket设置,并添加了一个新的公钥,在那里我粘贴了新的内容。
回到Git Bash提示,我通过输入命令确认它现在可以工作了…
ssh -T git@bitbucket.org
...然后我收到了我已经登录的消息
修复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将解释上述“长期修复”命令的来源。