explain why this happens and close

This commit is contained in:
Joey Hess 2022-08-04 12:39:07 -04:00
parent 6950e01e2a
commit 008204b2f3
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
2 changed files with 44 additions and 0 deletions

View file

@ -12,3 +12,5 @@ If there are any mistakes in my understanding please let me know.
sincerely yours,
Rino Mizuguchi
> [[notabug|done]] --[[Joey]]

View file

@ -0,0 +1,42 @@
[[!comment format=mdwn
username="joey"
subject="""comment 1"""
date="2022-08-04T16:22:09Z"
content="""
If you're using GIN, perhaps you're also using Datalad. Have you read
[their documentation](http://handbook.datalad.org/en/0.13_a/basics/101-139-gin.html)
on using it with git-annex?
Part of that documentation that seems likely to be especially
relevant is [here](http://handbook.datalad.org/en/0.13_a/basics/101-139-gin.html#access):
> Important: Take the URL in the browser, not the copy-paste URL
> Please note that you need to use the browser URL of the repository,
> not the copy-paste URL on the upper right hand side of the repository if you want
> to get anonymous HTTPS access! The two URLs differ only by a .git extension:
>
> Brower bar: `https://gin.g-node.org/<user>/<repo>`
>
> Copy-paste “HTTPS clone”: `https://gin.g-node.org/<user>/<repo>.git`
>
> A dataset cloned from `https://gin.g-node.org/<user>/<repoy>.git`, however, can not retrieve annexed files!
The reason is that git-annex needs to construct urls to download
files from the repo, starting with git's `config` file.
Looking at the sample repo <https://gin.g-node.org/adswa/DataLad-101>,
an url based on that works <https://gin.g-node.org/adswa/DataLad-101/config>,
but its web page suggests cloning the url
<https://gin.g-node.org/adswa/DataLad-101.git>, and
<https://gin.g-node.org/adswa/DataLad-101.git/config> does not work.
How does git manage to clone the latter url then? Well,
the http server is speaking the git smart http protocol.
So git makes requests like `https://gin.g-node.org/adswa/DataLad-101.git/info/refs?service=git-upload-pack`
which do work. But that protocol is not useful for git-annex, so it
needs the url where the actual files in the repository can be downloaded,
not the url where the smart http protocol is spoken.
There is not generally a way to discover one url from the other url
(removing ".git" might work in this case, but not in other cases).
So unfortunately you will need to remember to use the right url.
"""]]