zoukankan      html  css  js  c++  java
  • GitHub 在使用命令行 git push 时报错:The requested URL returned error: 403

    使用 git 的命令行向 GitHub 提交的时候,报错:

    [Young@localhost OtherLang]$ git push origin master
    error: The requested URL returned error: 403 Forbidden while accessing https://github.com/YoungZHU/OtherLang.git/info/refs
    
    fatal: HTTP request failed

    【解决办法】

    1)在该资源库(Repository)的目录下,运行

    cd .git
    # 执行后,可以用 ls 命令查看一下,会有一个 config 文件

    2)修改 config 文件

      找到 [remote "origin"] 节点下的 url 项,

      由原来的

    url = https://github.com/YoungZHU/OtherLang.git

      改成

    url = ssh://git@github.com/YoungZHU/OtherLang.git

    注意将 用户名(YoungZHU)资源库名(OtherLang)换成自己对应的

    OK ,再提交试试

    git push origin master
  • 相关阅读:
    ASP.NET线程相关配置
    ECshop 数据库表结构
    PHPnow 升级后 PHP不支持GD、MySQL
    C# 创建iis站点以及IIS站点属性,iis不能启动站点
    CSPS_107
    CSPS_106
    CSPS_105
    CSPS_104
    CSPS_103
    CSPS_102
  • 原文地址:https://www.cnblogs.com/memory4young/p/git-push-error-403.html
Copyright © 2011-2022 走看看