zoukankan      html  css  js  c++  java
  • Fix git 提交代码错误

    今天用git clone下代码,修改,push提交,发现以下错误

    [root@localhost gocache]# git push origin master
    error: The requested URL returned error: 403 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(1) 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
  • 相关阅读:
    eclipse- DDMS截图功能使用
    宏-新项目物理按键不能用
    宏-宏的添加跟代码中的使用
    SQlite-数据库的访问实例(转)
    git 工具的使用总结(6)-提交合并处理
    git 工具的使用总结(5)-查看历史记录
    git -处理分支合并
    Linux查询网址
    SQLite常用网址
    Java查询网址
  • 原文地址:https://www.cnblogs.com/zhuangzebo/p/4415808.html
Copyright © 2011-2022 走看看