GIT push 遇到 access denied问题
来源:互联网 发布:post json在线测试 编辑:程序博客网 时间:2024/05/01 09:22
在Win7 x64上,
执行git push 遇到 access denied
排查时,发现git pull也一样遇到access denied
原因:
之前,~/.ssh/id_rsa.pub(git bash路径,此例为 C:\Users\Administrator\.ssh目录,)
存放了注册于另一个git仓库(gitlab srv A)的另一个email (email A)的SSH pub key
而注册于当前git仓库(gitlab srv B)的当前email(email B) 生成的SSH pub key放到了~/.ssh/id_rsa_new.pub。
而其余设置已经按照服务器上的指南设好。
备份~/.ssh/id_rsa.pub后,
试图执行 cat ~/.ssh/id_rsa_new.pub > ~/.ssh/id_rsa.pub,似乎没有生效。
所以手动进入 ~/.ssh,
手动重命名了这两个.pub文件及其对应无后缀文件
~/.ssh/id_rsa.pub改为~/.ssh/id_rsa_old.pub
~/.ssh/id_rsa改为~/.ssh/id_rsa_old
~/.ssh/id_rsa_new.pub改为~/.ssh/id_rsa.pub
~/.ssh/id_rsa_new改为~/.ssh/id_rsa
之后OK。
0 1
- GIT push 遇到 access denied问题
- git push遇到的Permission denied (publickey).
- 【Git】Access denied
- 遇到1045-Access denied for user 'root'@'localhost' 的问题
- mybatis access denied问题
- Ubuntu上git push到GitHub可能会遇到的问题
- git push 遇到missing change id的问题
- git push时遇到问题“fatal: No destination configured to push to.”
- git push时遇到问题“fatal: No destination configured to push to.”
- GIT提交遇到问题 Push rejected: Push to origin/master was rejected
- git 问题:permission denied
- git push的问题
- Git@OSC Push问题
- git push问题
- git push 问题
- git push 失败问题
- git clone 遇到问题:fatal: unable to access
- Nginx - Access denied 问题排查
- Android-Gson详解
- The calculation of GPA HDU杭电1202
- Item 20:传递常量引用比传值更好 Effective C++笔记
- 有关微服务架构的争论:更简单还是更复杂?
- 欢迎使用CSDN-markdown编辑器
- GIT push 遇到 access denied问题
- UI中随机数的操作
- Linux 命令大全
- GPU Pro 2 ------ Volume Decals
- Ubuntu系统安装ARM-linux-gcc
- 回文数猜想 HDU杭电1282
- 设计模式之原型模式
- 文章标题
- swift自学注意点