Skip to content
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

Allow custom SSH user in UI for built-in SSH server. #2617

Closed
pgaskin opened this issue Sep 27, 2017 · 3 comments
Closed

Allow custom SSH user in UI for built-in SSH server. #2617

pgaskin opened this issue Sep 27, 2017 · 3 comments
Labels
type/enhancement An improvement of existing functionality
Milestone

Comments

@pgaskin
Copy link
Contributor

pgaskin commented Sep 27, 2017

The built-in SSH server is useful, especially for testing. The biggest disadvantage is that the user shown in the UI for the built-in SSH server is set to whatever the RUN_USER is set to, which must be the user Gitea is started as.

Because the built-in SSH server only uses the public-key to authenticate, I can use any user when cloning the repository.

In my opinion, there should be a config option to set a custom user to display in the UI in the SSH clone URL when the built-in SSH server is enabled. There could also be an option to omit the user entirely, because any user will work, as long as the SSH key is registered in the user's settings.

@pgaskin
Copy link
Contributor Author

pgaskin commented Sep 27, 2017

I may work on this if I have time, which I have been quite short on recently.

Related file: https://github.com/go-gitea/gitea/blob/master/models/repo.go#L818-L823

@lafriks lafriks added the type/enhancement An improvement of existing functionality label Sep 28, 2017
@lafriks lafriks added this to the 1.x.x milestone Sep 28, 2017
@pgaskin
Copy link
Contributor Author

pgaskin commented Oct 8, 2017

I am working on this now.

@pgaskin
Copy link
Contributor Author

pgaskin commented Oct 8, 2017

I have submitted a PR.

lafriks pushed a commit that referenced this issue Oct 14, 2017
* Allow custom SSH user in UI for built-in SSH server (#2617)

* Some fixes

* Did make fmt

* Updated according to review

- Renamed config to BUILTIN_SSH_SERVER_USER
- Removed unnecessary default string value for config item

* Updated according to review

* Fixed some minor issues
@bkcsoft bkcsoft closed this as completed Oct 16, 2017
@lunny lunny modified the milestones: 1.x.x, 1.3.0 Oct 16, 2017
@go-gitea go-gitea locked and limited conversation to collaborators Nov 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type/enhancement An improvement of existing functionality
Projects
None yet
Development

No branches or pull requests

4 participants