相关疑难解决方法(0)

推送到Git返回错误代码403致命:HTTP请求失败

我能够通过HTTPS身份验证克隆此repo的副本.我做了一些提交,想要推回到GitHub服务器.在Windows 7 x64上使用Cygwin.

C:\cygwin\home\XPherior\Code\lunch_call>git push
Password:
error: The requested URL returned error: 403 while accessing https://MichaelDrog
alis@github.com/derekerdmann/lunch_call.git/info/refs

fatal: HTTP request failed
Run Code Online (Sandbox Code Playgroud)

同时使用详细模式进行设置.我还是很困惑.

C:\cygwin\home\XPherior\Code\lunch_call>set GIT_CURL_VERBOSE=1

C:\cygwin\home\XPherior\Code\lunch_call>git push
Password:
* Couldn't find host github.com in the _netrc file; using defaults
* About to connect() to github.com port 443 (#0)
*   Trying 207.97.227.239... * 0x23cb740 is at send pipe head!
* Connected to github.com (207.97.227.239) port 443 (#0)
* successfully set certificate verify locations:
*   CAfile: C:\Program Files (x86)\Git/bin/curl-ca-bundle.crt
  CApath: none
* SSL …
Run Code Online (Sandbox Code Playgroud)

git dvcs github

608
推荐指数
23
解决办法
75万
查看次数

Git在推送代码时返回错误403

一切都运行正常,直到我创建一个新的GitHub帐户.当我尝试使用新帐户将代码第一次推送到github服务器时,发生以下错误:

remote: Permission to NEW_USER/NEW_REPO.git denied to OLD_USER.
fatal: unable to access 'https://github.com/NEW_USER/NEW_REPO/': The requested URL returned error: 403
Run Code Online (Sandbox Code Playgroud)

试图使用以下方法重置远程URL:

$git remote set-url origin https://username@github.com/user/repo.git ......但没有工作.

这里有一个解决方案,但适用于Mac OS.任何想法如何解决这个问题.运用git bash version 2.16.1.windows.4.

谢谢

git github

9
推荐指数
2
解决办法
8606
查看次数

标签 统计

git ×2

github ×2

dvcs ×1