Allow a different user running GOGS in Docker #7710
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.
At the moment the user running Gogs is git, although this is valid for the vast majority of the cases, there are situations where a different user needs to be configured.
For example: we need that a repository in Gogs is synchronized with an existing git repository in which user git is already used and allow only the commits coming from Gogs repository. In this case we need a specific user name different from the standard one.
PLEASE NOTE:
It's very important to notice that the user written in the app.ini configuration file (created during the gogs installation) must be consistent with the user set in the GOGS_USER environment variable.
Actually, this is completely left to the user, who must be aware to set the very same user.
As a future fix, it would be good to prefill the user input box in the installation screen with the value of the passed GOGS_USER.
Link to the issue: "n/a"