git push错误解决方案
错误提示:
error: The requested URL returned error: 403 Forbidden while accessing https://nanfei9330@github.com/nanfei9330/newsPM2.git/info/refs
解决方案,进入项目目录
vim .git/config
fetch = +refs/heads/*:refs/remotes/origin/*
url=https://github.com/yourid/example.git
修改为:
fetch = +refs/heads/*:refs/remotes/origin/*
url=https://yourid@github.com/yourid/example.git
再次尝试git push origin ....在弹出框输入github到登录密码即可提交成功
如果不想每次push都输入密码可以把url 那行改成ssh协议(注意下面红色部分是斜杠不是引号)
url = ssh://git@github.com/yourid/example.git
git push错误解决方案的更多相关文章
- github多用户git push错误remote: Permission to user1/z.git denied to user2
背景:同一台电脑的public key同时添加到了github的两个账户,导致user1的仓库没法正常提交. 解决办法:为两个账户分别配置ssh key,配置~/.ssh/config文件(windo ...
- git push 的解决方案
如果输入$ git push origin master 提示出错信息: 或者 失败的原因:不能 push 远端仓库 原因分析:由于你当前分支落后与远程端对应分支,所以无法更新: 解决方案:使用 gi ...
- 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 ...
- git push错误,如何回滚
--> git push Counting objects: 81, done.Delta compression using up to 4 threads.Compressing objec ...
- git push提交报错,提示文件过大,且去掉大文件也报同样的错误
错误原因: 大文件存在没有被提交的commit记录里面: 解决方案: 删除有大文件的commit记录即可 移除大文件的正确姿势 $ git rm --cached giant_file(文件名) # ...
- git push 时发生 error: failed to push some refs to 错误 (解决办法)
出现问题的原因:在github上更新了README.md,没有更新到本地仓库.而在本地git仓库又修改了文件,这时使用 git push origin master 推送到远程仓库后就出现了下面的问题 ...
- (诊断)解决GitHub使用双因子身份认证“Two-Factor Athentication”后无法git push 代码的“fatal: Authentication failed for ...”错误
在GitHub上采取双因子身份认证后,在git push 的时候将会要求填写用户的用户名和密码,用户名就是用户在GitHub上申请的用户名,但是密码不是普通登录GitHub的密码. 一旦采取双因子身份 ...
- git常见错误及解决方案总结
git常见错误及解决方案总结 使用git在本地创建一个项目的过程 $ makdir ~/hello-world //创建一个项目hello- ...
随机推荐
- python开发_mysqldb安装
在python的API上面,看到了MySQLdb,即python可以操作mysql数据库 接下来,我就把我这两天的工作给大伙絮叨絮叨: 准备条件: 1.MySQL-python-1.2.4b4.win ...
- SPOJ371 Boxes(最小费用最大流)
把球当作水. #include<cstdio> #include<cstring> #include<queue> #include<algorithm> ...
- [leetCode][013] Two Sum 2
题目: Given an array of integers that is already sorted in ascending order, find two numbers such that ...
- ubuntu中的Wine详解
什么是wine?(转自百度百科,具体看百科) wine,是一款优秀的Linux系统平台下的模拟器软件,用来将Windows系统下的软件在Linux系统下稳定运行,该软件更新频繁,日臻完善,可以运行许多 ...
- SecureCrt脚本(一)顶级对象之Crt
Crt自动化 测试 SecureCrt脚本 JS脚本 1.引言 2.关于脚本表头 3.顶级对象'crt'的子属性和方法 3.1.属性 3.1.1.Dialog 3.1.2.Screen 3.1.3 ...
- e.KeyChar用到的键盘对应ASCII码值(转)
十进制编码 (对应)缩写字符(或功能/解释) 0 NUL(null) 空字符 1 SOH(start of headline) 标题开始 2 STX (start of text) 正文开 ...
- RN组件之ViewPagerAndroid
一.ViewPagerAndroid 1.一个允许在子视图之间左右翻页的容器.每一个ViewPagerAndroid的子容器会被视作一个单独的页,并且会被拉伸填满 ViewPagerAndroid.注 ...
- Delphi 复习代码
1.取得可文件路径 Path := ExtractFilePath(Application.ExeName); //取得可执行文件路径 TXMLDocument.Create(ExtractFileP ...
- Using Vertex Texture Displacement for Realistic Water Rendering
http://blog.csdn.net/soilwork/article/details/709869 Using Vertex Texture Displacement for Realistic ...
- PHP 表单添加隐藏 Token 阻止外部提交
Token 法:通过一个隐藏可变的 Token 加大攻击的难度,每次提交都需要和服务器校对,如果不通过,则为外部提交(也可以通过 session + 隐藏域来验证). 代码: form.php < ...