相关疑难解决方法(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 push的SSH密钥

我有以下用例:我希望能够推送git@git.company.com:gitolite-admin使用用户的私钥gitolite-admin,而我想推送git@git.company.com:some_repo使用"我自己的"私钥.AFAIK,我无法解决这个问题~/.ssh/config,因为在这两种情况下用户名和服务器名都是相同的.由于我主要使用自己的私钥,因此我已将其定义~/.ssh/configgit@git.company.com.有没有人知道一种方法来覆盖用于单个git调用的密钥?

(旁白:gitolite基于密钥来区分谁在进行推送,因此在访问,所有权和审计方面,用户@服务器字符串对于不同的用户来说是相同的.)

git ssh gitolite

322
推荐指数
15
解决办法
22万
查看次数

标签 统计

git ×2

dvcs ×1

github ×1

gitolite ×1

ssh ×1