-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
inability to access data from private repos over http; could there be 401 and not 404 #111
Comments
well, I slept on it for a few minutes, and I think it might actually be something for annex to adjust in its treatment of 404 to be more inline with git: https://git-annex.branchable.com/bugs/be_like_git_and_ask_for_credentials_if_404/ . Let's see what Joey thinks. |
see more discussion/details in aforementioned git-annex issue. So far the conclusion is: it should be up to gogs/gin to return proper 401 and not 404. github apparently returns 401 whenever user agent is set to |
Might be worth asking for this (or offering it) upstream then. They're usually receptive to changes that bring it closer to other hosted git services. |
IIRC it was our patching within |
yeah, this is what I was going for. 401 for unreachable repository paths for git to trigger logins like github does. |
Describe the bug
I feel like we had some issue filed somewhere but may be it was just a discussion or I have just failed to find it. May be I had in mind just the report/discussion I had with Joey (git-annex) on nearby issue (and where I mentioned gin as future use case).
It seems that gogs (similar to github and somewhat to gitlab), to not reveal presence of a private repository, just sends over there is no correct http response from gogs whenever a request is sent to private repo's
/config
over http:So, instead of receiving 401 which would instruct client that authentication is needed, client would need to have gin specific knowledge that 404 might also mean 401 really, and then try to authenticate one way or another. That brings me back to the discussion with Joey I had mentioned above and in particular his "final comment" that he would unlikely to implement some "let's try this and that" ;-)
I would say, that unlike in case of github where may be someone would may be distill some commercially useful secret of someone having or not some private repository, I think in the case of
gin
it would make much more sense to provide a more informative response (401 not 404) in such cases. That hopefully might make git-annex immediately (since Joey did address that issue I reported awhile back) usable with gin for private repos over http.WDYT?
Meanwhile -- here are some more details since you have asked ;)
Git version
Operating system
Debian GNU/Linux testing/sid mix
Database
have no clue since do not use any ;)
To Reproduce
upon initial get git-annex does not really disclose us why it sets annex-ignore for the origin
But if I reset that config and retry, it becomes a bit more obvious:
although also a bit strange since it is not 404 but some time out...
The text was updated successfully, but these errors were encountered: