weblate icon indicating copy to clipboard operation
weblate copied to clipboard

Gerrit integration: configure gitreview.username from ssh://user@gerrit... push-URL / provide way to set username from UI

Open cloph opened this issue 1 year ago • 3 comments

Describe the problem

gerrit integration ignores the username provided in push-URL and instead uses the system user's name, at least in the presence of a .gitreview file specifying host, port, project and branch but omitting a username.

That then obviously fails due to lack of permissions and git-review used by weblate asks for a username to try again (and since it is run non-interactive mode it only gets EOF)

Describe the solution you'd like

Weblate should set up gitreview.username configuration when setting up a component/new repository. Either by adding a dedicated input field in the VCS settings, or more straightforward reading it from the pushurl if in ssh://user@..... format

Describe alternatives you've considered

Alternatively it can be solved by telling the user in documentation to manually set the git config in the data/vcs... clone

Screenshots

No response

Additional context

No response

cloph avatar Dec 12 '23 12:12 cloph

This issue seems to be a good fit for newbie contributors. You are welcome to contribute to Weblate! Don't hesitate to ask any questions you would have while implementing this.

You can learn about how to get started in our contributors documentation.

github-actions[bot] avatar Dec 13 '23 08:12 github-actions[bot]

This should be pretty easy to implement by customizing configure_remote in the GitWithGerritRepository class.

nijel avatar Dec 13 '23 08:12 nijel

Hi guys, check my PR #11585 for this issue.

harriebird avatar May 06 '24 16:05 harriebird

Thank you for your report; the issue you have reported has just been fixed.

  • In case you see a problem with the fix, please comment on this issue.
  • In case you see a similar problem, please open a separate issue.
  • If you are happy with the outcome, don’t hesitate to support Weblate by making a donation.

github-actions[bot] avatar May 13 '24 13:05 github-actions[bot]