今天用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 提交代码错误的更多相关文章

  1. 在使用Git提交代码的时候犯了个低级错误

    今天在使用git提交代码的时候,犯了个很低级的错误,按照一切流程当我add并commit提交代码,最后使用push到远程仓库, 接下来奇怪的事情发生了,push之后,查看远程仓库代码并没有发现提交记录 ...

  2. git提交代码出现错误fatal: Unable to create '项目路径/.git/index.lock': File exists.

    git提交代码出现错误fatal: Unable to create '项目路径/.git/index.lock': File exists. 具体出错代码如下: 具体原因不详,在stackoverf ...

  3. Git提交代码到主分区

    git 提交代码,本地新建一个my分支,不从本地master分支直接上传,而是先从本地my分支上提交至本地master分支,然后本地master提交至远程master分支 上.前提是远程只有一个mas ...

  4. pycharm 使用Git提交代码到Github

    pycharm 使用Git提交代码到Github pytharm 创建django项目,提交到github总是失败,在github创建项目拉下来后项目层级会多一层,为此查了一些资料,亲测如下方式可行. ...

  5. Git提交代码规范 而且规范的Git提交历史,还可以直接生成项目发版的CHANGELOG(semantic-release)

    Git提交代码规范 - 木之子梦之蝶 - 博客园 https://www.cnblogs.com/liumengdie/p/7885210.html Commit message 的格式 Git 每次 ...

  6. git提交代码到github

    前言:转载请注明出处:http://blog.csdn.net/hejjunlin/article/details/52117504 git提交代码到github 命令汇总: git init git ...

  7. 使用git提交代码到github,每次都要输入用户名和密码的解决方法

    自从使用git提交代码到github后,发现自己使用git的功力增长了不少,但也遇到不少问题.比如,使用git提交代码到github的时候,经常要求输入用户名和密码,类似这种: 网上有这么一种解决方法 ...

  8. Git提交代码失败: empty ident name (for <>) not allowed

    使用git提交代码,报错如下: 下午2:56 Commit failed with error 0 files committed, 1 file failed to commit: 升级 empty ...

  9. 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 ...

随机推荐

  1. visual foxpro命令

    根据条件查看已打开dbf表单的记录----LIST ALL FIELDS FOR =''   最后按一下enter键

  2. Unable to require openssl, install OpenSSL and rebuild ruby (preferred) or use non-HTTPS sources解决

    解决方法 ruby -v rvm requirements brew install libyaml rvm pkg install openssl rvm install 2.3.1 --with- ...

  3. Oracle nvchar2和varchar2区别分析

    Oracle nvchar2和varchar2区别分析: [注意]VARCHAR2是Oracle提供的特定数据类型,Oracle可以保证VARCHAR2在任何版本中该数据类型都可以向上和向下兼容.VA ...

  4. bash:fdisk:command not found

    bash:fdisk:command not found [lansir@Red-Hat ~]$ fdisk -l-bash: fdisk: command not found 原因是fdisk不在P ...

  5. Python—函数的参数组合

    参数组合 在Python中定义函数,可以用必选参数.默认参数.可变参数.关键字参数和命名关键字参数,这5种参数都可以组合使用.但是请注意,参数定义的顺序必须是:必选参数.默认参数.可变参数.命名关键字 ...

  6. getWinSystemIcon

    #include <QtGui/QImage>#include <QtGui/QPixmap>void getSystemIcon(const chConstStringA&a ...

  7. Spark standalone HA

    配置Spark standalone HA 主机:node1,node2,node3 master: node1,node2 slave:node2,node3 修改配置文件: node1,node3 ...

  8. 关于monkeyrunner的一些初步理解性的题目

    1.Monkeyrunner中包含几个基本类?分别大概的作用是什么? Monkeyrunner中基本包含了MonkeyRunner,MonkeyDevice,MonkeyImage MonkeyRun ...

  9. Java浮点数float,bigdecimal和double精确计算的精度误差问题总结

    (转)Java浮点数float,bigdecimal和double精确计算的精度误差问题总结 1.float整数计算误差 案例:会员积分字段采用float类型,导致计算会员积分时,7位整数的数据计算结 ...

  10. 关于hibernate的n+1问题以及解决办法

    hibernate的n+1问题已经是一个很常见的问题了. 最近遇到了很多次的n+1问题,总结一下解决办法: 1.ManyToOne中的n+1: 当查询单个的时候,可以使用