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 ...
随机推荐
- Laravel 5.1 关掉csrf验证
Laravel 5.1 关掉csrf验证 说明: Laravel默认是开启了CSRF功能,有时可能不能传递验证token,就需要关闭. 方法一(全局关闭): 打开文件:app\Http\Kernel. ...
- 洛谷—— P2183 巧克力
https://www.luogu.org/problemnew/show/P2183 题目描述 佳佳邀请了M个同学到家里玩.为了招待客人,她需要将巧克力分给她的好朋友们.她有N(1<=N< ...
- 优雅的使用ImageGetter
https://daihanglin.github.io/2017/10/13/imageGetter/ 1. 使用ImageGetter的场景 Android中用于显示文本的控件为textVie ...
- cf744
Codeforces Round #385 (Div. 1) <br > A.Hongcow Builds A Nation 贪心. 显然就是凑成一个最大的块即可 那么首先并查集处理已经确 ...
- CODECHEF Nov. Challenge 2014 Chef & Churu
@(XSY)[分塊] Hint: 題目原文是英文的, 寫得很難看, 因此翻譯為中文. Input Format First Line is the size of the array i.e. \(N ...
- down
Description 给出一个数列,求出这个序列的最长下降子序列的长度及方案数,子序列中的权值完全相同视为同一个序列 Input 第一行一个整数n,接下来一行n个整数表示序列的权值 Output 一 ...
- WCF中常用的binding方式 z
WCF中常用的binding方式: BasicHttpBinding: 用于把 WCF 服务当作 ASMX Web 服务.用于兼容旧的Web ASMX 服务. WSHttpBinding: 比 Bas ...
- 使用XtraGrid自定义列计算 z
绑定Master-Detail 关系 数据也是数据显示的一种方式,此实例使用后台代码创建数据源并绑定到gridcontrol. 其实方式参见:点击打开链接 先看效果图(默认方式) 直接给出后台代码,主 ...
- Window10下Apache2.4的安装和运行
以前用Python运行的Web框架都是要运行在Linux下,加上WSGI服务器,比如Gunicorn+Flask,后来了解到了Apache,看看能不能基于Apache这个Web服务器下给python提 ...
- Solidworks安装完成提示failed to load slderresu.dll怎么办
安装完成出现下面的一系列错误提示 进入到语言包,重新安装中文语言包即可 可以正常打开和运行了