今天用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. Action名称的搜索顺序

    假设当前的路径的URL是:http://StrutsDemo01/path1/path2/path3/test.action 步骤1.首先寻找命名空间(namespace)为 /path1/path2 ...

  2. c++接口实现与分离(转载)

    原文地址:http://www.360doc.com/content/13/0218/10/8363527_266294787.shtml 良好的设计应该只暴露接口给用户,所有的实现细节对用户来说应该 ...

  3. 【BZOJ3123】森林(主席树,启发式合并)

    题意:一个带点权的森林,要求维护以下操作: 1.询问路径上的点权K大值 2.两点之间连边 n,m<=80000 思路:如果树的结构不发生变化只需要维护DFS序 现在因为树的结构发生变化,要将两棵 ...

  4. js中常用的操作

    1.js中常用的数组操作 2.js中常用的字符串操作 3.js中常用的时间日期操作 4.定时器

  5. 2016. last day in office

    外面黑了,水面上黑魆魆的看不清楚了. 明天请假了,2017年再见! 2017加油! 2017 English improving!

  6. Redis GetTypedClient

    C#操作Redis   未包含GetTypedClient定义 原创,转载请注明出处. VS版本:2015 用NuGet安装了Redis的包 按照百度的各种教程来操作,但是发现网上下载的DEMO可以正 ...

  7. .net学习笔记--序列化与反序列化

    序列化其实就是将一个对象的所有相关的数据保存为一个二进制文件(注意:是一个对象) 而且与这个对象相关的所有类型都必须是可序列化的所以要在相关类中加上 [Serializable]特性 对象类型包括:对 ...

  8. JAVA XML

    为什么要用XML:1各平台之间程序很难直接交流 2各程序之间交换数据 xml定义  可扩展标记语言,标准通用标记语言的子集,一种用于标记电子文件使其具有结构性的标记语言. 它可以用来标记数据.定义数据 ...

  9. TCP/IP协议工作原理简述

    TCP/IP协议工作原理简述 // */ // ]]>   TCP/IP协议工作原理简述 Table of Contents 1 概要 2 应用层 3 传输层 4 网络层 5 链路层 1 概要 ...

  10. modesim测试语句

    : 'd2; Reg2 <= Reg1; i <= i + 1'b1; join : 'd2; i <= i + 1'b1; join : 'd2; Reg2 <= Reg1; ...