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 ...
随机推荐
- urllib.urlretrieve的用法
urllib.urlretrieve(url, local, cbk) urllib.urlretrieve(p,'photo/%s.jpg'%p.split('/')[-4]) url要下载的网站 ...
- Angularjs学习笔记(四)----与后端服务器通信
一.使用$http进行XHR和JSONP请求 1.1 XHR请求 GET:$http.get(url,config) POST:$http.post(url,data,config) PUT:$htt ...
- oracle字符查出一位
select cast('a' as varchar2(64)) from dual;
- http2协议翻译(转)
超文本传输协议版本 2 IETF HTTP2草案(draft-ietf-httpbis-http2-13) 摘要 本规范描述了一种优化的超文本传输协议(HTTP).HTTP/2通过引进报头字段压缩以及 ...
- HDMI学习
市面上大多4K显示器都配备了HDMI 1.4接口,仅能实现30Hz的刷新率,不足以带来流畅的显示效果, 酱紫情况,就算是搭配了HDMI 2.0高清线也是无法发挥其作用.只有更先进的HDMI 2.0标准 ...
- position与z-index的关系
.simulationgame .gameranking .rankinginfo{ width:140px; margin:0 auto; font-family:Arial, Microsoft ...
- sql server 触发器应用 insert
--添加自定义错误码提示,要求先有英文版才能有中文版 EXEC sp_addmessage ,,@msgtext='Violation of the table unique constraint', ...
- Send SqlParameter to Dapper
Question: I' using Dapper in my project. I have a list of SqlParameters and I want to send it to Dap ...
- react 写的省市三级联动
<!DOCTYPE html><html><head> <meta charset="utf-8"> <title>Ba ...
- a 标签提交前验证
最近在做验证的时候遇到了submit()与onsubmit()事件冲突的问题,本来想在a标签中添加submit()进行表单的提交,然后在 form中添加onsubmit事件触发验证方法.结果行不通,最 ...