17

何が起こっているのかわかりません。github から応答がありません。1か月ほどで初めてgit pushを試みたところ、これが得られました。export GIT_CURL_VERBOSE=1 をオンにし、プッシュしてこれを取得しました:

localhost:send2mobile_rails phil$ 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... * Connected to github.com (207.97.227.239) port 443 (#0)
* SSL connection using DHE-RSA-AES256-SHA
* Server certificate:
*    subject: O=*.github.com; OU=Domain Control Validated; CN=*.github.com
*    start date: 2009-12-11 05:02:36 GMT
*    expire date: 2014-12-11 05:02:36 GMT
*    subjectAltName: github.com matched
*    issuer: C=US; ST=Arizona; L=Scottsdale; O=GoDaddy.com, Inc.; OU=http://certificates.godaddy.com/repository; CN=Go Daddy Secure Certification Authority; serialNumber=07969287
*    SSL certificate verify ok.
> GET /303devworks/send2mobile_rails.git/info/refs?service=git-receive-pack HTTP/1.1
User-Agent: git/1.7.1
Host: github.com
Accept: */*
Pragma: no-cache

< HTTP/1.1 401 Authorization Required
< Server: nginx/0.7.61
< Date: Tue, 01 Jun 2010 10:53:13 GMT
< Content-Type: text/html; charset=iso-8859-1
< Connection: keep-alive
< Content-Length: 0
< WWW-Authenticate: Basic realm="Repository"
< 
* Connection #0 to host github.com left intact
* Issue another request to this URL: 'https://303devworks@github.com/MYUSERHERE/send2mobile_rails.git/info/refs?service=git-receive-pack'
* Couldn't find host github.com in the .netrc file; using defaults
* Re-using existing connection! (#0) with host github.com
* Connected to github.com (207.97.227.239) port 443 (#0)
* Server auth using Basic with user '303devworks'
> GET /303devworks/send2mobile_rails.git/info/refs?service=git-receive-pack HTTP/1.1
Authorization: Basic MzAzZGVfd29sa3M6Y29nbmwzNzIw
User-Agent: git/1.7.1
Host: github.com
Accept: */*
Pragma: no-cache

< HTTP/1.1 200 OK
< Server: nginx/0.7.61
< Date: Tue, 01 Jun 2010 10:53:13 GMT
< Content-Type: application/x-git-receive-pack-advertisement
< Connection: keep-alive
< Status: 200 OK
< Pragma: no-cache
< Content-Length: 153
< Expires: Fri, 01 Jan 1980 00:00:00 GMT
< Cache-Control: no-cache, max-age=0, must-revalidate
< 
* Expire cleared
* Connection #0 to host github.com left intact
Counting objects: 166, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (133/133), done.
* 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... * connected
* Connected to github.com (207.97.227.239) port 443 (#0)
* SSL re-using session ID
* SSL connection using DHE-RSA-AES256-SHA
* old SSL session ID is stale, removing
* Server certificate:
*    subject: O=*.github.com; OU=Domain Control Validated; CN=*.github.com
*    start date: 2009-12-11 05:02:36 GMT
*    expire date: 2014-12-11 05:02:36 GMT
*    subjectAltName: github.com matched
*    issuer: C=US; ST=Arizona; L=Scottsdale; O=GoDaddy.com, Inc.; OU=http://certificates.godaddy.com/repository; CN=Go Daddy Secure Certification Authority; serialNumber=07969287
*    SSL certificate verify ok.
* Server auth using Basic with user 'MYUSERHERE'
> POST /303devworks/send2mobile_rails.git/git-receive-pack HTTP/1.1
Authorization: Basic JzAzZGV1d29ya3M6Y25nb29zNzIq
User-Agent: git/1.7.1
Host: github.com
Accept-Encoding: deflate, gzip
Content-Type: application/x-git-receive-pack-request
Accept: application/x-git-receive-pack-result
Expect: 100-continue
Transfer-Encoding: chunked

* The requested URL returned error: 411
* Closing connection #0
error: RPC failed; result=22, HTTP code = 411
Writing objects: 100% (140/140), 2.28 MiB | 1.93 MiB/s, done.
Total 140 (delta 24), reused 0 (delta 0)
^C
localhost:send2mobile_rails phil$ 
4

4 に答える 4

17

私は同じ問題を抱えていましたが、プッシュしようとしているリポジトリのサイズ (編集済みまたは特定のファイルのサイズ) に関係していると考えています。

基本的に、新しいリポジトリを作成して github にプッシュすることができました。しかし、既存のものは機能しません。

HTTP エラー コードは、「必要な長さ」エラーであることを裏付けているようです。したがって、計算するには大きすぎるか、最大値を超えている可能性があります。知るか。

編集

問題は大きなファイルである可能性があることがわかりました。その時点までプッシュが成功したにもかかわらず、プッシュされない更新が 1 つあります。コミットにはファイルが 1 つしかありませんでしたが、たまたま 1.6M でした

そこで、次の構成変更を追加しました

git config http.postBuffer 524288000

ファイルサイズ500Mまで許可すると、プッシュが機能しました。これは、http プロトコルを介して大きなレポをプッシュする際の最初の問題であった可能性があります。

編集終了

私がそれを機能させる方法(postBufferを変更する前に編集)は、レポをtarし、sshでgitを実行できるマシンにコピーして、githubにプッシュすることでした。次に、元のサーバーからプッシュ/プルを実行しようとすると、https 経由で動作するはずです。(元のプッシュよりもデータ量がはるかに少ないため)。

お役に立てれば。

于 2010-08-31T02:01:35.383 に答える
8

同じ問題が発生しました。これが私の問題を解決した方法です。

  1. バッファサイズを増やしました

    git config http.postBuffer 524288000

  2. 次に、サーバー内のユーザーを確認したところ、ユーザー名が削除されました。そこで、次のコマンドを使用してファイルを再作成しましたsudo htpasswd -c /etc/users dilip_rajkumar

これが誰かに役立つことを願っています。

于 2012-07-09T09:14:18.523 に答える
5

GitHub が現在サポートしている「スマート http(s) プロトコル」を使用してプッシュしようとしているようです。 ここで、プロキシの問題やファイアウォールの問題がないと仮定しましょう。

リモート アップストリーム リポジトリ アドレスは何ですか?
(何git remote -v showのリスト?)

私がお勧めします:

    マシン github.com
    ログイン your_github_login
    パスワード your_github_password
  • repo のクローンを再度作成し、git clone https://github.com/your_github_login/gitrepo.gitそのインスタンスをプッシュしてみてください。

注:Noufal Ibrahimのコメントとして、sshを使用できます(sshポートがブロックされていない限り、http / https接続のみが残ります)

git clone ssh://user@server:project.git
于 2010-06-01T11:44:25.917 に答える
1

新しい.netrcファイルの作成で問題が発生した場合は、そのファイルがHOMEディレクトリ(cd〜/)にあることを確認し、読み取り可能(chmod 600〜/ .netrc)であることを確認し、次のようになっていることを確認します。

マシンgithub.com
ログインyourgithublogin
パスワードyourgithubpassword

于 2011-07-26T15:09:26.417 に答える