github多用户git push错误remote: Permission to user1/z.git denied to user2
$ 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多用户git push错误remote: Permission to user1/z.git denied to user2的更多相关文章
- 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的朋 ...
- git@github.com: Permission denied (publickey).////remote: Permission to xxx/test.git denied to xxx.等权限问题
Error msg git@github.com: Permission denied (publickey) 或者: remote: Permission to xxx/test.git denie ...
- remote: Permission to user_name/Code.git denied to other_user_name. fatal: unable to access 'https://github.com/user_name/Code.git/': The requested URL returned error: 403
Error msg: $ git push remote: Permission to xxx/Code.git denied to xxxxxx. fatal: unable to access ' ...
- git push是报Permission denied (publickey)错误解决
今天晕了半天了,搞了个git工程到github上,以为很简单,因为之前也弄过,那知道搞了大半天都搞不好,一直报如下错误 D:\javawork\ee-0.0.1-SNAPSHOT>git pus ...
- git push错误解决方案
错误提示: error: The requested URL returned error: 403 Forbidden while accessing https://nanfei9330@gith ...
- git push 错误,回滚 push操作
作者:故事我忘了¢个人微信公众号:程序猿的月光宝盒 0.记一次使用git push后,覆盖了同事代码的糗事 前言: 都在WebStorm中操作,Idea或者PyCharm同理 为了高度还原尴尬 ...
- Git push错误non-fast-forward后的冲突解决
当要push代码到git时,出现提示: error:failed to push some refs to ... Dealing with “non-fast-forward” errorsFrom ...
- coding云进行git push报:permission denied
1.原因可能是 登录其他的git 项目,本地缓存了其他用户的 用户名和密码 认证信息,导致一直权限不通过 解决: git remote add origin http://yourname:passw ...
- git解决 remote: Permission to wuheng1991/site-manager.git denied to XXX
1.问题 2.解决 生成一个新的SSH KEY ssh-keygen -t rsa –C “youremail@example.com” 命令: 3.修改 .git/config中的url 4.gi ...
随机推荐
- 【费式数列(Fibonacci数列)】
/* 说明: Fibonacci为1200年代的欧洲数学家,在他的着作中曾经提到:若有一只兔子每个月生一只小兔子,一个月后也开 始生产.起初只有一只兔子,一个月后就有两只兔子,二个月后就有三只兔子,三 ...
- ubuntu 更新引导命令
sudo update-grub 运行结果: Generating grub configuration file ...Warning: Setting GRUB_TIMEOUT to a non- ...
- Javascript日期格式化指定格式的字符串实现
代码部分 TypeScript /** * format a Date object * 将 Date 转化为指定格式的String * @param {Date} date 源日期对象 * @par ...
- js精要之模块模式
// 模块模式是一种用于创建拥有私有数据的单件对象的模式,基本做法是使用立调函数(IIFE)来返回一个对象 var yourObjet = (function(){ // 私有数据 return { ...
- ArcGIS Pro 简明教程(4)工具和模型构建器
ArcGIS Pro 简明教程(4)工具和模型构建器 by 李远祥 工具箱中的工具 ArcGIS Pro 在1.3版本基本上已经继承了ArcMap的所有工具,而且会不断加入一些它自身才有的工具,例如适 ...
- asp.net core mvc实现伪静态功能
在大型网站系统中,为了提高系统访问性能,往往会把一些不经常变得内容发布成静态页,比如商城的产品详情页,新闻详情页,这些信息一旦发布后,变化的频率不会很高,如果还采用动态输出的方式进行处理的话,肯定会给 ...
- Padding Borders Outlines Margins
简介: 在20世纪90年代,许多网页布局是使用table,使用table最主要的原因是因为可以放text到一个盒子里,但是这是一个比较复杂的过程,现在可以使用比较简单的方法,那就是css. 元素盒子: ...
- 深度神经网络(DNN)反向传播算法(BP)
在深度神经网络(DNN)模型与前向传播算法中,我们对DNN的模型和前向传播算法做了总结,这里我们更进一步,对DNN的反向传播算法(Back Propagation,BP)做一个总结. 1. DNN反向 ...
- 在javascript中关于变量与函数的提升
在javascript中关于变量与函数的提升 一.简介 在javascript中声明变量与函数的执行步骤: 1.先预解析变量或函数声明代码,会把用var声明的变量或者函数声明的代码块进行提升操作 2. ...
- groovy hello world
安装方法见官方文档http://groovy.codehaus.org/Installing+Groovy 用新一个文件HelloWorld.groovy,以utf8的编码保存,内容为: printl ...