github多用户提交错误Permission to repo denied to
$ git push
remote: Permission to user1/python.git denied to user2.
fatal: unable to access 'https://github.com/user1/python.git/': The requested URL returned error: 403
解决:
$ ssh-keygen -t rsa -C "user1"
Generating public/private rsa key pair.
Enter file in which to save the key (/c/Users/waston/.ssh/id_rsa): user1_rsa
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in user1_rsa.
Your public key has been saved in user1_rsa.pub.
The key fingerprint is:
SHA256:BJ5FGpGBCwM+Vw9769IACYHKoWD8gJURyYuSNOJQjUY user1
The key's randomart image is:
+---[RSA 2048]----+
|=OEB +==o |
|BBX =.=* |
|@*=B o+o. |
|*o+.o ... |
|. . .S |
| + |
| . o |
| . |
| |
+----[SHA256]-----+
#Default GitHub
Host github.com
HostName github.com
User git
IdentityFile ~/.ssh/user1_rsa
IdentitiesOnly yes Host github2
HostName github.com
User git
IdentityFile ~/.ssh/user2_rsa
IdentitiesOnly yes
cat@cat-pc MINGW64 /f/github/python (master)
$ ssh -T github.com
Hi user1! You've successfully authenticated, but GitHub does not provide shell access.
cat@cat-pc MINGW64 /f/github/python (master)
$ git push
Everything up-to-date
user2仓库测试:
$ ssh -T github2
Hi user2! You've successfully authenticated, but GitHub does not provide shell access.
cat@cat-pc MINGW64 /h/z8 (master)
$ git remote -v
origin git@github.com:user2/z.git (fetch)
origin git@github.com:user2/z.git (push)
cat@cat-pc MINGW64 /h/z8 (master)
$ git remote set-url origin git@github2:user2/z.git
cat@cat-pc MINGW64 /h/z8 (master)
$ git push
Everything up-to-date
其它:
github多用户提交错误Permission to repo denied to的更多相关文章
- github多用户git push错误remote: Permission to user1/z.git denied to user2
背景:同一台电脑的public key同时添加到了github的两个账户,导致user1的仓库没法正常提交. 解决办法:为两个账户分别配置ssh key,配置~/.ssh/config文件(windo ...
- Windows10 下 github ssh 访问出现 Permission denied(publickey)错误的解决方法
Windows10 下 github ssh 访问出现 Permission denied(publickey)错误的解决方法. 错误信息: git clone git@github.com:ediw ...
- github 有名的问题【ERROR: Permission to .git denied to user】
小乌龙 以前一直是单兵做战,所以github repo对于我而言,只是一个存放.同步.备份代码的地方,协同作用完全没有体现出来. 最近跟朋友一起开发一个项目,他在github建了个公共的repo,我正 ...
- Windows下解决github push failed (remote: Permission to userA/XXXX.git denied to userB.) 上传gitHub失败报错
Windows环境下解决 github push failed (remote: Permission to userA/XXXX.git denied to userB.) · 初学GitHub的朋 ...
- svn 提交错误 400 Bad Reqest MKACTIVITY 请求于XX失败 Conflict Unable to connect to a repository at URL
思路来源:http://www.cnblogs.com/wangyt223/archive/2012/11/22/2782801.html svn 提交错误 400 Bad Reqest MKACTI ...
- IntelliJ IDEA svn 提交错误
环境说明: 系统:Mac OS X 10.9 以及 10.10 系统设置:LANG=zh_CN.UTF-8 svn 客户端:1.8.10 IntelliJ IDEA 13 毫无疑问,IntelliJ ...
- Github 中提交项目到自己仓库的 gh-pages 分支
Github 中提交项目到自己仓库的gh-pages分支 cd cnblogs-theme/ git init git remote add origin git@github.com:hglibin ...
- 当尝试从ArcCatalog、.net应用或是Java应用中连接ArcGIS Server 时,显示下面任何一种错误提示: "Access Denied" 或 "The connection could not be made"
Error: 访问拒绝或无法连接错误 文章编号 : 29042 软件: ArcGIS Server 9.0, 9.1, 9.2, 9.3, 9.3.1 操作系统: Windows 2000, XP, ...
- Apache/2.4.9启动错误:AH01630: client denied by server configuration
在升级Yii框架1.11->2.0beta时,PHP升级到5.5.顺带升级Apache2.2.x到2.4.9. 把原有vhost配置移植过来,出现Apache启动错误: AH01630: cli ...
随机推荐
- delphiIDE 把 window 桌面改慢后的 还原方法
在开始搜索框中键入services.msc,然后按回车键,打开服务列表. 重启这个服务就可以了.
- hdu 1181(Floyed)
变形课 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/65536 K (Java/Others)Total Submis ...
- js-利用插件qrcode.min.js,前端实时生成二维码
qrcode.min.js <script type="text/javascript" src="js/jquery.min.js"></s ...
- Codeforces 934 A.Compatible Pair
http://codeforces.com/contest/934 A. A Compatible Pair time limit per test 1 second memory limit p ...
- CodeForces - 393E Yet Another Number Sequence
Discription Everyone knows what the Fibonacci sequence is. This sequence can be defined by the recur ...
- Android图片缓存之Lru算法(二)
前言: 上篇我们总结了Bitmap的处理,同时对比了各种处理的效率以及对内存占用大小.我们得知一个应用如果使用大量图片就会导致OOM(out of memory),那该如何处理才能近可能的降低oom发 ...
- 邁向IT專家成功之路的三十則鐵律 鐵律二十五:IT人屈辱之道-十倍奉還
現代人普遍火氣都很大,與人爭論時只要有一點點感到屈辱,便會開始大聲反擊,甚至於暴力相向.至於企業中的人事相鬥,則是典型的來個明爭暗鬥,直到成為老闆眼中的紅人,在逐漸掌握了權力之後再來個內部大清洗,不久 ...
- andriod Java中度转度分秒
public String trandu2m(double d) { //gisoracle 编号 try { //double dd = Convert.ToDouble(str); String ...
- HDU 4514并查集判环+最长路
点击打开链接 题意:中文题...... 思路:先推断是否能成环,之前以为是有向图,就用了spfa推断,果断过不了自己出的例子,发现是无向图.并查集把,两个点有公共的父节点,那就是成环了,之后便是求最长 ...
- https双向认证訪问管理后台,採用USBKEY进行系统訪问的身份鉴别,KEY的证书长度大于128位,使用USBKEY登录
近期项目需求,须要实现用USBKEY识别用户登录,採用https双向认证訪问管理后台管理界面,期间碰到过一些小问题,写出来给大家參考下. 1:前期准备工作 USBKEY 硬件:我买的是飞天诚信 epa ...