-
-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Updated agit doc for git-repo #27014
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
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we already provide a mechanism to put files into root, like
/robots.txt
? Or maybe that path is already occupied, not familiar with/ssh_info
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only one I could find was
/assets/<file>
, andrepo
/git-repo
expect it to be at the root of the host 🤷🏼♀️There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The quite old "assets" handler logic is: if local file exists, then use it, otherwise, pass it to other handles.
However, the logic has been changed long time ago, the local file doesn't have higher priority than other handlers.
For example: if you have a file in
{Custom}/public/my-name
and an orgmy-name
{Custom}/public/my-name
is servedmy-name
is severed.TBH, the quite old logic looks good to me, while I guess some nice features were changed unintentionally by many round iterations.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change was introduced by : "add /assets as root dir of public files #15219" and "Customization files should not require /assets path segment #15906" in 1.15
After that PR, users couldn't serve their custom files in web root anymore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is special handling for robots.txt to remain under the root path. Maybe we could include the ssh_info in the binary directly? It would require reserving the "ssh_info" username, but I think that would be acceptable as a "breaking" change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer to take the "quite old logic" back, then end users could still have the ability to serve any file in the web root.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, gitea has defined
/ssh_info
router, but the type has been defined asgitea
(example: https://try.gitea.io/ssh_info), That's because I'm not sureagit
flow has been fully implement. looks need more work. and I hasn't checking whether gitea can be used withgit-repo
tool also.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm working through why it hasn't been working as intended, and this is what I've found so far. If the router has implemented
/ssh_info
but it's wrong, then we should fix it. It's ultimately something from Gerrit:https://github.com/GerritCodeReview/gerrit/blob/587e12178e06e63c0ac8c31e6ec0cbc59b232eea/java/com/google/gerrit/httpd/raw/SshInfoServlet.java#L31-L48