我如何解决权限被git-remote-https拒绝的错误? [英] How can I resolve a permission denied error with git-remote-https?

查看:4484
本文介绍了我如何解决权限被git-remote-https拒绝的错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用以下命令尝试克隆GitHub存储库时遇到问题:

  git clone https://用户名@ github.com / MYPROJECT.git 

运行它时,出现此错误:

  fatal:can not exec'git-remote-https':Permission denied 

如何解决它?

解决方案

>

  git clone https://github.com/username/MYPROJECT 

对于 public 回购,这应该是正确的http地址(而不是通过ssh会话访问github)。

它将利用他们的智能http支持

  git clone https://username@github.com/username/project.git 

用于私人回购(如在这里解释),如果你的ID是正确的,并且你的公共ssh密钥在你的GitHub帐户上正确更新,它应该可以工作。

(注意:你的原始地址缺少 /用户名/ 部分)



OP报告:


我的RSA密钥在验证时没有使用,我做了一个 ssh-add 和添加它们。

之后,它通过在终端中运行 ssh -vT git@github.com 来计算出它


I'm having trouble trying to clone a GitHub repository with the following command:

git clone https://username@github.com/MYPROJECT.git

When I run it, I get this error:

fatal: cannot exec 'git-remote-https': Permission denied

How can I resolve it?

解决方案

Try:

 git clone https://github.com/username/MYPROJECT

Which should be the correct http address (instead of trying to access github through an ssh session) for a public repo.
It will take advantage of their support for smart http.

 git clone https://username@github.com/username/project.git

is for private repo (as explained here), which should work if your id is right and your public ssh key correctly updated on your GitHub account.
(Note: your original address was missing the /username/ part)

The OP reports:

my RSA keys were not used when authenticating, I did a ssh-add and added them.
After that it worked figured it out by running ssh -vT git@github.com in my terminal

这篇关于我如何解决权限被git-remote-https拒绝的错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆