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

Support for different post/host in the ssh://... url in the web interface. #268

Closed
wants to merge 2 commits into
base: master
from

Conversation

Projects
None yet
2 participants
@bogeskov

bogeskov commented Jun 4, 2015

I've tried to run gitblit in a docker container, and wanted to run the ssh server on what looks like port 22.
However I didn't want to run it as root. So I exposed the default port as (server's 2nd ip) port 22.
Then I would like an easy way of using this port in the web interface.

So I added git.sshDisplayHost/Port to the config.


Commit comment:

Added git.sshDisplay{Port|Host} to hide port forward.

Running gitblit in a container it's easy to expose the ssh on the default port.
Using git.sshDisplayPort/git.sshDisplayHost you can expose the forwarded address
as the official location.

Morten Bøgeskov
Added git.sshDisplay{Port|Host} to hide port forward.
Running gitblit in a container it's easy to expose the ssh on the default port.
Using git.sshDisplayPort/git.sshDisplayHost you can expose the forwarded address
as the official location.
@gitblit

This comment has been minimized.

Show comment
Hide comment
@gitblit

gitblit Jun 4, 2015

Owner

I understand the use-case for the port. I am not understanding the hostname setting. When would the hostname in web.canonicalUrl be different than the one in git.sshDIsplayHost?

Owner

gitblit commented Jun 4, 2015

I understand the use-case for the port. I am not understanding the hostname setting. When would the hostname in web.canonicalUrl be different than the one in git.sshDIsplayHost?

@bogeskov

This comment has been minimized.

Show comment
Hide comment
@bogeskov

bogeskov Jun 4, 2015

The reason for the git.sshDisplayHost, is that the primary url is mapped into an apache with proxypass together with some other services (/artifactory, /jenkins, /moinmoin , /sonarqube, ...), so that I have only one http entrypoint. But the ssh is on the server that actually runs the docker gitblit container.
I suppose I could install a port forwarder on port 22 on the webserver machine, and then add an extra ip, to that one for ssh access. However if I was to go that way, I would should probably rethink the entire setup, which has all the symptoms of a but shooting organism.

bogeskov commented Jun 4, 2015

The reason for the git.sshDisplayHost, is that the primary url is mapped into an apache with proxypass together with some other services (/artifactory, /jenkins, /moinmoin , /sonarqube, ...), so that I have only one http entrypoint. But the ssh is on the server that actually runs the docker gitblit container.
I suppose I could install a port forwarder on port 22 on the webserver machine, and then add an extra ip, to that one for ssh access. However if I was to go that way, I would should probably rethink the entire setup, which has all the symptoms of a but shooting organism.

Morten Bøgeskov
Added git.sshDisplay{Port|Host} to hide port forward.
Running gitblit in a container it's easy to expose the ssh on the default port.
Using git.sshDisplayPort/git.sshDisplayHost you can expose the forwarded address
as the official location.

Handle undefined (empty defined) settings.
@bogeskov

This comment has been minimized.

Show comment
Hide comment
@bogeskov

bogeskov Jun 4, 2015

Just realized that I didn't handle empty settings properly. Committed a fix to that.

bogeskov commented Jun 4, 2015

Just realized that I didn't handle empty settings properly. Committed a fix to that.

@gitblit

This comment has been minimized.

Show comment
Hide comment
@gitblit

gitblit Jun 15, 2015

Owner

I manually merged & revised your contribution to the develop branch. Thanks!

Owner

gitblit commented Jun 15, 2015

I manually merged & revised your contribution to the develop branch. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment