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
  • 相关阅读:
    母函数
    匈牙利算法
    AC 自动机
    MFC Invalidate闪屏问题
    求解x=a^b(mod m)
    Millar_rabin和Pollard_Rho
    图论入门算法理解
    Numpy 库常用函数大全
    Linux 系统中“|”管道的作用是什么
    win10 万能修复公式
  • 原文地址:https://www.cnblogs.com/zhuangzebo/p/4415808.html
Copyright © 2011-2022 走看看