web-dev-qa-db-ja.com

gitのエラーメッセージ "サーバーは未承認オブジェクトの要求を許可していません"とはどういう意味ですか?

私はgithubからチェックアウトしようとしています、そして私はこのエラーメッセージを得ました:

[user@Arch ~]$ git clone --recursive https://github.com/simsong/tcpflow.git
Cloning into 'tcpflow'...
The authenticity of Host 'github.com (192.30.253.113)' can't be established.
RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'github.com,192.30.253.113' (RSA) to the list of known hosts.
remote: Counting objects: 4190, done.
remote: Compressing objects: 100% (32/32), done.
remote: Total 4190 (delta 21), reused 29 (delta 12), pack-reused 4146
Receiving objects: 100% (4190/4190), 50.27 MiB | 2.21 MiB/s, done.
Resolving deltas: 100% (2954/2954), done.
Submodule 'src/be13_api' (https://github.com/simsong/be13_api.git) registered for path 'src/be13_api'
Submodule 'src/dfxml' (https://github.com/simsong/dfxml.git) registered for path 'src/dfxml'
Submodule 'src/http-parser' (https://github.com/nodejs/http-parser.git) registered for path 'src/http-parser'
Cloning into '/home/user/tcpflow/src/be13_api'...
remote: Counting objects: 1203, done.
remote: Compressing objects: 100% (8/8), done.
remote: Total 1203 (delta 2), reused 5 (delta 1), pack-reused 1194
Receiving objects: 100% (1203/1203), 477.47 KiB | 1.96 MiB/s, done.
Resolving deltas: 100% (821/821), done.
Cloning into '/home/user/tcpflow/src/dfxml'...
remote: Counting objects: 1929, done.
remote: Total 1929 (delta 0), reused 0 (delta 0), pack-reused 1929
Receiving objects: 100% (1929/1929), 572.09 KiB | 2.89 MiB/s, done.
Resolving deltas: 100% (1294/1294), done.
Cloning into '/home/user/tcpflow/src/http-parser'...
remote: Counting objects: 1487, done.
remote: Total 1487 (delta 0), reused 0 (delta 0), pack-reused 1487
Receiving objects: 100% (1487/1487), 667.24 KiB | 2.46 MiB/s, done.
Resolving deltas: 100% (916/916), done.
Submodule path 'src/be13_api': checked out 'c81521d768bb78499c069fcd7c47adc8eee0350c'
Submodule path 'src/dfxml': checked out 'c31224626cf5f6678d42cbcfbfcd4e6191c9a864'
error: Server does not allow request for unadvertised object 5bbcdc5df9d01b521e8da011bab0da70bdec3653
Fetched in submodule path 'src/http-parser', but it did not contain 5bbcdc5df9d01b521e8da011bab0da70bdec3653. Direct fetching of that commit failed.
[user@Arch ~]$

だから私はこれらのリポジトリのメンテナです。 src/http-parserは他のリポジトリのフォークであり、そのリポジトリのメンテナは.gitignoreファイルにいくつかの自動生成されたファイルを追加するという私のpull requestを(理由もなしに)受け入れていません。しかし、私はそれがここの問題だとは思わない。

20
vy32

jgit - gitの宣伝文句は何ですか? - スタックオーバーフロー

取り出し中に、サーバーはそれが持っている参照およびクライアントが取り出したい参照をリストすることができます。これらは宣伝された参考文献です。

  • のようにサーバーから直接コミットすることはできません。参照(ブランチとタグ)のみ参照できます。あるいは、Githubサーバーはそのような要求を許可しないように設定されています。 。
  • ですから、--depth で特定のコミットをしたい場合、それはフェッチされたrefから最大で<depth>-1コミットしたものでなければなりません(これはサブモジュールのメタデータで指定されたブランチ/タグです。

    通常、50100のように、depthを合理的に大きいがまだリポジトリ内のコミットの総数よりはるかに小さい数に設定することを推奨します。例えば。 50は、Travisがプロジェクトの初期クローンを作成するときに使用するものです。

サブモジュールを--depthで更新していない場合、コミットを見つけられなかった場合は、次のいずれかを意味します。

  • サブモジュールのツリーは "浅い"状態にあり、上記が適用されます(以前に--depthまたは .gitmodulesのエントリがshallow = true で更新された場合にのみ可能です)
  • サブモジュールが使用しているブランチ上にコミットがない
  • コミットはサブモジュールのリポジトリには全くありません:
    • 誰かが間違えた、
    • またはそれはかつてそこにいたが強制的なプッシュによって削除された

レコードに関しては、あなたの特定のケースでは、それは最後のケースでした:commit 5bbcdc5df9d01b521e8da011bab0da70bdec3653は、https://github.com/simsong/http-parser.gitレポジトリにまったくありません。

5
ivan_pozdeev

広告されていないオブジェクトにアクセスする1つの方法は、同期することです。次に、サブモジュールの更新が機能するはずです:

git submodule sync
git submodule update
1
carver