[英]Permission denied (publickey) error when trying to clone from GitHub
I want to clone a repository and I ran into permission issues, I tried to set up my username and email but keep getting errors 我想克隆一个存储库,遇到权限问题,我试图设置用户名和电子邮件,但不断出错
I used 我用了
git config --global user.name "yusuf-uthman"
git config --global user.email "yusufuthman57@gmail.com"
but didnt get any notification wether its accepted or not. 但无论是否接受,均未收到任何通知。
Uthman@DESKTOP-30QGK3L MINGW64 ~/Desktop/Scripts/hng_internship5.0
$ git config --global user.name "Uthman Yusuf"
Uthman@DESKTOP-30QGK3L MINGW64 ~/Desktop/Scripts/hng_internship5.0
$ git config --global user.email "yusufuthman57@gmail.com"
Uthman@DESKTOP-30QGK3L MINGW64 ~/Desktop/Scripts/hng_internship5.0
$ git clone git@github.com:yusuf-uthman/hng-internship.git
Cloning into 'hng-internship'...
Warning: Permanently added the RSA host key for IP address '192.30.253.113' to the list of known hosts.
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
I expect to have permission and be able to clone the repository, I'm sure the repository exists because I just created it, I will appreciate any help 我希望有权限并且能够克隆存储库,我确定存储库存在,因为我刚刚创建了存储库,我将不胜感激
but didnt get any notification wether its accepted or not. 但无论是否接受,均未收到任何通知。
Username and Email are just settings in you git config file, no one will accept or decline it. 用户名和电子邮件只是您git配置文件中的设置,没有人会接受或拒绝它。 If you commit, the value of the settings will be used to determine the commits author and committer. 如果提交,则设置的值将用于确定提交的作者和提交者。
Access rights to a repository are usually managed via ssh keys. 对存储库的访问权限通常通过ssh密钥进行管理。 See Connecting to GitHub with SSH . 请参阅使用SSH连接到GitHub 。
It looks like you are cloning your github repo via SSH URLs (for this you need to add your public SSH key in your repository) 看来您正在通过SSH URL克隆github存储库(为此,您需要在存储库中添加公共SSH密钥)
Use HTTP URL method to clone and then IMO you'll be able to clone it on your local. 使用HTTP URL方法克隆,然后IMO,您将能够在本地克隆它。
Format: - SSH URLs: git clone git@github.com:yusuf-uthman/hng-internship.git
- HTTP URLs: https://github.com/yusuf-uthman/hng-internship.git
格式: git clone git@github.com:yusuf-uthman/hng-internship.git
URL: git clone git@github.com:yusuf-uthman/hng-internship.git
-HTTP URL: https://github.com/yusuf-uthman/hng-internship.git
: https://github.com/yusuf-uthman/hng-internship.git
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.