git无法关联远程仓库解决方法
来源:互联网 发布:手机健身软件 编辑:程序博客网 时间:2024/05/17 06:56
问题:
git无法关联到远程仓库,push失败
错误提示如下:
$ git push -u origin masterThe authenticity of host 'github.com (192.30.253.113)' can't be established.RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.Are you sure you want to continue connecting (yes/no)? yesWarning: Permanently added 'github.com,192.30.253.113' (RSA) to the list of known hosts.Permission denied (publickey).fatal: Could not read from remote repository.Please make sure you have the correct access rightsand the repository exists.
因为之前电脑上有下载过git bash,并且关联过远程仓库。再重新下载软件时提醒报错,无法从远程仓库拉取代码。
解决方法
原因:没有配公钥
步骤:创建SSH Key。在用户主目录下,
$ ssh-keygen -t rsa -C “youremail@example.com”
这样就有了.ssh目录,这个目录下有id_rsa和id_rsa.pub这两个文件
这两个就是SSH Key的秘钥对,id_rsa是私钥,不能泄露出去,id_rsa.pub是公钥,可以放心地告诉任何
人。
第2步:登陆GitHub,打开“Account settings”,“SSH Keys”页面:
然后,点“Add SSH Key”,填上任意Title,在Key文本框里粘贴id_rsa.pub文件的内容
这样即可成功关联远程仓库
总结
每次都要重新配置添加密钥。
0 0
- git无法关联远程仓库解决方法
- 使用Git关联远程仓库
- git学习(本地仓库关联远程仓库)
- git之本地仓库关联远程仓库
- git本地仓库关联到远程仓库
- Git 关联多个远程仓库
- git--本地和远程仓库的关联
- AndroidStudio项目关联git远程仓库
- git安装及关联远程仓库
- Git 关联新的远程仓库
- 本地git仓库修改关联远程地址
- Git学习笔记---本地关联远程仓库
- git 关联远程仓库的问题
- 本地Git仓库和远程仓库的创建及关联
- Git本地仓库与Github远程仓库关联
- git本地仓库关联远程仓库的两种方式
- git本地仓库关联远程仓库的两种方式
- 本地Git仓库和远程仓库的创建及关联
- update_engine模块移植到linux平台
- swift 干货
- iOS 自定义表情键盘
- Linux映秧 Windows下磁盘
- poj 1422 Air Raid(最小路径覆盖)
- git无法关联远程仓库解决方法
- http协议解析
- mac 无法连接vpn问题
- Manifest merger failed : Attribute application@icon value=(@mipmap/ic_launcher) from AndroidManifest
- Eclipse里面安装maven插件
- Codeforces 552B
- 51nod 1631 小鲨鱼在51nod小学 【线段树--】
- 小白的python学习机器学习路(一)
- unity 代码添加AnimationEvent