#4586 Failed git clone if .git suffix is missing from URL
Opened 3 months ago by msrb. Modified a month ago

I am not sure if this is a real bug, but it is a surprising behaviour.

I can clone rpms/bash via HTTP without any problems (note the missing .git suffix)

$ git clone https://src.fedoraproject.org/rpms/bash
Cloning into 'bash'...
remote: Counting objects: 2054, done.
remote: Compressing objects: 100% (1504/1504), done.
remote: Total 2054 (delta 1027), reused 1159 (delta 527)
Receiving objects: 100% (2054/2054), 638.38 KiB | 503.00 KiB/s, done.
Resolving deltas: 100% (1027/1027), done.

But I cannot do the same for rpms/star package (again, the .git suffix is missing):

$ git clone https://src.fedoraproject.org/rpms/star
Cloning into 'star'...
error: RPC failed; HTTP 404 curl 22 The requested URL returned error: 404
fatal: the remote end hung up unexpectedly

Note everything works as expected when the full URL, with the .git suffix, is used.

I suspect that this is caused by some Flask/Werkzeug routing magic.


Metadata Update from @jlanda:
- Issue tagged with: bug

3 months ago

I'm wondering if we can reproduce this error on https://stg.pagure.io

I feel like this isn't quite pagure related and more likely tight to a deployment issue but I'm not 100% sure either.

Examining these transactions using git clone -v -v ... shows that both attempts are actually making it most of the way through the process. It's the POST git-upload-pack step that's hitting a 404.

All of this output is the same either way

Cloning into 'star'...
Server supports multi_ack_detailed
Server supports no-done
Server supports side-band-64k
Server supports ofs-delta
Server version is git/1.8.3.1
want e94506113c558abb0764ab2b438d26faa40dd685 (HEAD)
want 2c7ba7495864f6b54be3881ca0389ab9c701d16b (refs/heads/f10)
want 7cf2f8e4bfb0a46cc64b3c622ef3d7ad5f872c12 (refs/heads/f11)
want 32565c115082735442c1f034f3421980321a810f (refs/heads/f12)
want 036119cd7725bd2d202a69eabdf642dd9e18c46a (refs/heads/f13)
want 3b8cd4d64ef1ad0bd5eae9ce601a05b4d3c6a5dd (refs/heads/f14)
want b1143826cfcf826c6e9dd9988a6e2c2f59c9951e (refs/heads/f15)
want b1143826cfcf826c6e9dd9988a6e2c2f59c9951e (refs/heads/f16)
want f92aef1873969e12da335a0c59db6dbcd08fdde6 (refs/heads/f17)
want 2165805ab6052a1cace4c3e2424f23641ff45374 (refs/heads/f18)
want a3b8c87cee2b58eac3faefa9b3d3160d82db608a (refs/heads/f19)
want dfbde78b4d62caff34e8f89aff6589ea4944cad0 (refs/heads/f20)
want e63577b075623b30fa943eb9c1cc9e60fb21c51f (refs/heads/f21)
want e63577b075623b30fa943eb9c1cc9e60fb21c51f (refs/heads/f22)
want 1383046230d73b36a86324df2c71954c67eea5ca (refs/heads/f23)
want 03b7b29cf3aa6ec363be3bae00792ac2819adae1 (refs/heads/f24)
want b81ff972abddd865aab399063495f9d2a29dd96d (refs/heads/f25)
want fb2b57669fcd5f94a4224d611d3b65f818d3fc97 (refs/heads/f26)
want a1e1ea72e2871bc317fbbf2d5a81d1a883317e1a (refs/heads/f27)
want 1421199b13595ca790077f85a83496a62e8ccb51 (refs/heads/f28)
want 1421199b13595ca790077f85a83496a62e8ccb51 (refs/heads/f29)
want 22adb50183e6bf7ca3986c76f7fc1765a4515b63 (refs/heads/f30)
want d20d1b69e3ae09f01529f495076e232ad5042abc (refs/heads/f31)
want 88455b31172528629fc54395ba04b339eaabcaa8 (refs/heads/f7)
want 41d5073bce149c6761dfc1647d935f1a48650581 (refs/heads/f8)
want 663bbe230c96017897cd46327afcfc261932789a (refs/heads/f9)
want e94506113c558abb0764ab2b438d26faa40dd685 (refs/heads/master)
want 900ad0f2e47031b0ecdec579b84dbd80561d0c5a (refs/tags/F-10-split)
want 86e99758e94785043d335ae7d8ac493049e93089 (refs/tags/F-10-start)
want f3a409cc6d058fbdcca28378409d77ad6daad3af (refs/tags/F-11-split)
want 84e8e15205059f0774d803ba037d0be1eb6c1d6a (refs/tags/F-11-start)
want 72c75fc57bb605112c5498253e6009246ca03b3d (refs/tags/F-12-split)
want 9072a0b0c60b12ad3836cc2e7bc3d44c54fa5aaa (refs/tags/F-12-start)
want 59be62421457271ccba64343ccdec32f28f3eccf (refs/tags/F-13-split)
want 12a4d691183e79b8696984e45179040221377109 (refs/tags/F-13-start)
want 4eed78ebe4e2ccce243405e730136371d308ea22 (refs/tags/F-7-split)
want 62058862ab7b3207451dbb83015ef6ec74303fb6 (refs/tags/F-7-start)
want e50409a1e4856682e1db229980bcb71375676cb7 (refs/tags/F-8-split)
want 9db17e17e54b421103193600b7daa46ce43aa975 (refs/tags/F-8-start)
want 9ed63e61fd311fdb9fdfdefee7439f64e2090b1d (refs/tags/F-9-split)
want 2020cccd3c963f1fc4e83500d0fbd85376734123 (refs/tags/F-9-start)
want 0f4e0627a09e588656a70f82edcb0ca409b534f4 (refs/tags/FC-1-split)
want 3cc8f5013434904186286813abd4ecf57d01a7c9 (refs/tags/FC-2-split)
want b3ce6caf0df232e33db14d22d7040eb5b611bfcc (refs/tags/FC-3-split)
want 55204339163cbd7ea2b67e8fc7a420dac143c126 (refs/tags/FC-4-split)
want 3d3bd4c31c0836b6cc0f246621b005ce166f15c7 (refs/tags/FC-5-split)
want 191a960c8094457c6563263c08b214070da9195b (refs/tags/FC-6-split)
want 66f98f71d9af07251094f6a39d80b0a7c20bdefc (refs/tags/RHEL-3-split)
want e262c04ad2b363c90c4870ec8fb10ca3ca72f211 (refs/tags/RHEL-4-split)
want 958f2d111c456c0b362d3f443f0cadc298fe0bba (refs/tags/RHL-8-split)
want 3d7fc52285e1035911088433197762bb2a161ddb (refs/tags/RHL-9-split)
want f9c5e27c92dc08808073ecf885429c8e7caa6ec7 (refs/tags/present-on-devel)
want 12d2a9baed0ad9bad9cdd4610241e7d128e096ac (refs/tags/star-1_5-1_fc11)
want 680905905d913223a0853439359ece19543c2545 (refs/tags/star-1_5-2_fc11)
want 466062a269f8b8aa73bdd367a8f51c5ce79b2813 (refs/tags/star-1_5-3_fc11)
want 5ff8730c4373feb7b58fbcabb729b237c5cf2eb9 (refs/tags/star-1_5-4_fc11)
want cc84db6d494c354a023646e8442953fe9d54442c (refs/tags/star-1_5-5_fc12)
want 1dce24b9c3153146bad05b7b226272b3ff6c6195 (refs/tags/star-1_5-6_fc12)
want eb2c0d0dfbe63530cb6c9d63c86d87d1b4c6e609 (refs/tags/star-1_5-7_fc12)
want 6f07be7ee53912b87b34a5f90870dc240d421007 (refs/tags/star-1_5-8_fc12)
want 78ee8a65ab5977eb5a03f30a777a16e073c0579e (refs/tags/star-1_5-9_fc12)
want 44a52da6f297a681c7cd999efe2bc2a743df8f31 (refs/tags/star-1_5_1-1_fc13)
want b67685bccf4969226deaca825939ccb7885025e5 (refs/tags/star-1_5_1-2_fc13)
want f002520d8c3077313675abc6758e310e1cd6c625 (refs/tags/star-1_5a04-1)
want c10a6caad2ba85db166d1d6aa09142d958bcefb0 (refs/tags/star-1_5a04-1_0p)
want aff900f4cea55ab0a5d999ad41e4d826a93b9975 (refs/tags/star-1_5a08-4)
want b8263478fbcbf560966b453c7902652d158df99b (refs/tags/star-1_5a18-2)
want b672869483b4b8e5326306758600946a3a2a8ba8 (refs/tags/star-1_5a25-3)
want d5656cf2b7870be919f7cf169a24c99b450815f3 (refs/tags/star-1_5a25-4)
want 3704859e2a6401121e05a7e010b82e548801bfaf (refs/tags/star-1_5a25-5)
want 3dc1cc0ad2aab90a5fa6da074600dc5db2b734f3 (refs/tags/star-1_5a25-6)
want 90be706da060ce40c5691dbef772540b4ebd2b88 (refs/tags/star-1_5a54-1)
want a0716941e62887dcbb0e199f42db68dfada05629 (refs/tags/star-1_5a54-2)
want 243a11d5e67bc9bd0ae6f10de0d8bdd2e0d6178b (refs/tags/star-1_5a54-3)
want a8f46ade5802aa1474e297dfbd5c7d4b08de68ad (refs/tags/star-1_5a64-1)
want 4e6a535f00f0f14abbbc0aa11c42604282755d09 (refs/tags/star-1_5a65-1)
want 23927981c2686f63060830a713ad0f90270db432 (refs/tags/star-1_5a67-1)
want c3ddf184973102659e78edb6503fd45971f156fe (refs/tags/star-1_5a68-1)
want 7da61a2d86e3c91c8ba73a18d11a960d55f3421a (refs/tags/star-1_5a69-1)
want d90bd9754084e3b615e3b7c28252c526a808a441 (refs/tags/star-1_5a69-1_1)
want 3853a0be9fa60282a99efe349889c539486dbd9f (refs/tags/star-1_5a69-1_2)
want 16cc3596ca681db6094baec243ae79ba245f1b55 (refs/tags/star-1_5a69-1_2_1)
want 6aef0cfa5eae8b315ba574de4ac0740c49dbd1f6 (refs/tags/star-1_5a71-1)
want a625b6196601f0dc147484fdb90ce0c2a590657f (refs/tags/star-1_5a72-1)
want ecbe9703989edaa476e66508469f25791900099c (refs/tags/star-1_5a73-1)
want c1dfbb61849c7021d6a062a87b62653b811cb3ee (refs/tags/star-1_5a74-1)
want a28420bff6e3e9a4752a2bcc434f91f700bd1741 (refs/tags/star-1_5a74-2)
want 8d6c67a29ef49d428dab6abf3ee23a1bf2277ad5 (refs/tags/star-1_5a74-3)
want a18a57f22d959be227d31e60112c7c6b1278f8cc (refs/tags/star-1_5a74-3_1)
want 6df4b8d53940b90624781da1768913e7145df627 (refs/tags/star-1_5a75-1)
want 42e8d417cb2d91ff4b36c1401da3fcbcdd8b8b1d (refs/tags/star-1_5a76-1_fc7)
want 8ba9da55942c0414edad2499429e90de25ef3bae (refs/tags/star-1_5a76-2_fc7)
want 414549b981cab312dfe64a1a1471805da83f1a1f (refs/tags/star-1_5a76-3_fc8)
want 72ff9d04fa795075f54bbf7b93a1317ab5c1eb26 (refs/tags/star-1_5a84-1_fc8)
want 2d99c68170e74ba44eda0bb2b7f2e65c6e54977e (refs/tags/star-1_5a84-2_fc7)
want a3985c27f8c411231577c186384b453fa2a3d175 (refs/tags/star-1_5a84-2_fc8)
want 6c84097ac1e2602ae1d6e218f95bace1811c17f0 (refs/tags/star-1_5a84-3_fc7)
want 8528f9f3c21727890480735e4e2f88809d9473c9 (refs/tags/star-1_5a84-3_fc8)
want c720b951f3be3c82bf62f8d0a2d37d35983546b5 (refs/tags/star-1_5a84-4_fc9)
want 11dc750d603d9314e7df9257ffab8ff268ba5885 (refs/tags/star-1_5a84-5_fc10)
want 1e9724b66fe26a4a6999a4917e64056432f9cc09 (refs/tags/star-1_5a84-5_fc9)
want 01ba6107e4bc57f8c3554bcdae14cb47c4d0b47f (refs/tags/star-1_5a84-6_fc10)
want bcf898b77deda0327ecb69b0b285a84ab2216cb4 (refs/tags/star-1_5a89-1_fc11)
done
POST git-upload-pack (gzip 5241 to 2599 bytes)

For https://src.fedoraproject.org/rpms/star it then shows:

error: RPC failed; HTTP 404 curl 22 The requested URL returned error: 404
fatal: the remote end hung up unexpectedly

For https://src.fedoraproject.org/rpms/star.git:

remote: Counting objects: 576, done.
remote: Compressing objects: 100% (377/377), done.
remote: Total 576 (delta 288), reused 373 (delta 167)
Receiving objects: 100% (576/576), 128.77 KiB | 935.00 KiB/s, done.
Resolving deltas: 100% (288/288), done.

Because the transactions are HTTPS, WireShark can't see what's happening inside the TLS connection, so I can't tell why the two operations are processed differently.

Interestingly (maybe), after cloning the star.git version:

$ git clone https://src.fedoraproject.org/rpms/star.git star-git
Cloning into 'star-git'...
remote: Counting objects: 576, done.
remote: Compressing objects: 100% (377/377), done.
remote: Total 576 (delta 288), reused 373 (delta 167)
Receiving objects: 100% (576/576), 127.50 KiB | 864.00 KiB/s, done.
Resolving deltas: 100% (288/288), done.
$ cd star-git
$ git remote -v
origin  http://src.fedoraproject.org/rpms/star.git (fetch)
origin  http://src.fedoraproject.org/rpms/star.git (push)

Using it as a reference will allow the non-.git version to be set up successfully, even though its origin uses the "bad" URL:

$ cd ..
$ git clone --dissociate --reference star-git/ \
https://src.fedoraproject.org/rpms/star star-nogit
Cloning into 'star-nogit'...
Enumerating objects: 576, done.
Counting objects: 100% (576/576), done.
Delta compression using up to 4 threads
Compressing objects: 100% (256/256), done.
Writing objects: 100% (576/576), done.
Total 576 (delta 288), reused 576 (delta 288)
$ cd star-nogit
$ git remote -v
origin  https://src.fedoraproject.org/rpms/star (fetch)
origin  https://src.fedoraproject.org/rpms/star (push)

I guess the question is, what would happen the next time it has something to fetch?

Login to comment on this ticket.

Metadata