Fix git 提交代码错误
今天用git clone下代码,修改,push提交,发现以下错误
[root@localhost gocache]# git push origin master
error: The requested URL returned error: Forbidden while accessing https://github.com/zebozhuang/gocache.git/info/refs
查一下,原来是我用https clone代码,在.git下的remote url也会使用https,参考
http://stackoverflow.com/questions/7438313/pushing-to-git-returning-error-code-403-fatal-http-request-failed
在.git下修改config
url = ssh://git@github.com/zebozhuang/gocache.git
即可。
问题的实质是git的版本过低导致。参考
https://help.github.com/articles/https-cloning-errors/
问题解决!
----------------------------------------------Fri Apr 10 22:45:01 CST 201,出现新问题
git pull
There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull() for details git pull <remote> <branch> If you wish to set tracking information for this branch y git branch --set-upstream-to=origin/<branch> master
也属于老版本问题,解决
git branch --set-upstream-to=origin/master master
参考
http://stackoverflow.com/questions/10147475/git-checkout-tag-git-pull-fails-in-branch
Fix git 提交代码错误的更多相关文章
- 在使用Git提交代码的时候犯了个低级错误
今天在使用git提交代码的时候,犯了个很低级的错误,按照一切流程当我add并commit提交代码,最后使用push到远程仓库, 接下来奇怪的事情发生了,push之后,查看远程仓库代码并没有发现提交记录 ...
- git提交代码出现错误fatal: Unable to create '项目路径/.git/index.lock': File exists.
git提交代码出现错误fatal: Unable to create '项目路径/.git/index.lock': File exists. 具体出错代码如下: 具体原因不详,在stackoverf ...
- Git提交代码到主分区
git 提交代码,本地新建一个my分支,不从本地master分支直接上传,而是先从本地my分支上提交至本地master分支,然后本地master提交至远程master分支 上.前提是远程只有一个mas ...
- pycharm 使用Git提交代码到Github
pycharm 使用Git提交代码到Github pytharm 创建django项目,提交到github总是失败,在github创建项目拉下来后项目层级会多一层,为此查了一些资料,亲测如下方式可行. ...
- Git提交代码规范 而且规范的Git提交历史,还可以直接生成项目发版的CHANGELOG(semantic-release)
Git提交代码规范 - 木之子梦之蝶 - 博客园 https://www.cnblogs.com/liumengdie/p/7885210.html Commit message 的格式 Git 每次 ...
- git提交代码到github
前言:转载请注明出处:http://blog.csdn.net/hejjunlin/article/details/52117504 git提交代码到github 命令汇总: git init git ...
- 使用git提交代码到github,每次都要输入用户名和密码的解决方法
自从使用git提交代码到github后,发现自己使用git的功力增长了不少,但也遇到不少问题.比如,使用git提交代码到github的时候,经常要求输入用户名和密码,类似这种: 网上有这么一种解决方法 ...
- Git提交代码失败: empty ident name (for <>) not allowed
使用git提交代码,报错如下: 下午2:56 Commit failed with error 0 files committed, 1 file failed to commit: 升级 empty ...
- Git提交代码报错Git push error:src refspec XXX matches more than one解决方案
Git提交代码push时,报错这个 error: src refspec master matches more than one. error: failed to push some refs t ...
随机推荐
- Count(*)或者Count(1)或者Count([列]) 区别
在SQL 中Count(*)或者Count(1)或者Count([列])或许是最常用的聚合函数.很多人其实对这三者之间是区分不清的.本文会阐述这三者的作用,关系以及背后的原理. 往常我经常会看到一些所 ...
- Device eth0 does not seem to be present, delaying initialization. 问题
今天在复制vmware的时候 出现网卡无法启动 报错显示 Device eth0 does not seem to be present, delaying initialization. 这个错误原 ...
- Halcon学习之条形码实时扫描
dev_open_window(1,1,400,400,'blue',ThisHandle) create_bar_code_model([], [], BarCodeHandle) set_bar_ ...
- javascript的数值转换
在javascript中数值转换,最要的一点是函数第一个字母必须要大写.js中的函数有string字符型.number数值型.null空型.boolean布尔型.undefined未定义. 具体的转换 ...
- 今天研究一下SVN的分支和合并
关键字: trunk, branch, tag, merge 以前一直以为很难,没敢接触.今天晚上看了一下,也不过如此 用起来还是很简单的
- Qt之QMutex
概述 QMutex 类使得线程之间可序列化,文档中的描述为provides access serialization between threads 它被设计的初衷是用来保护一个对象.数据结构.代码段 ...
- Wpf DatePicker 水印修改为中文
效果图: 在App.cs添加如下代码: protected override void OnStartup(StartupEventArgs e) { base.OnStartup(e); Event ...
- centos安装python
安装Development tools yum groups install -y 'development tools' yum install -y zlib-dev openssl-devel ...
- iOS中UITableView使用总结
链接:http://www.open-open.com/lib/view/open1430008922468.html
- 解决:eclipse 非正常关闭,导致无法正常启动
eclipse 无法正常启动: !ENTRY org.eclipse.ui.navigator 4 2 2016-09-07 11:23:54.181 !MESSAGE 从插件调用代码时出现问题:“o ...