@@ -103,27 +103,28 @@ git-open can automatically guess the corresponding repository page for remotes
103103- Visual Studio Team Services
104104- Team Foundation Server (on-premises)
105105
106- ### GitLab support
106+ ### Configuration ( GitLab support)
107107
108- To configure GitLab support you need to set some options.
108+ To configure GitLab support (or other unique hosting situations) you need to set some options.
109+
110+ | option name | description |
111+ | ------------------------- | ---------------- |
112+ | open.[gitdomain].domain | The (web) domain to open based on the provided git repo domain |
113+ | open.[gitdomain].protocol | The (web) protocol to open based on the provided git repo domain. (Defaults to `https`) |
109114
110- | option name | description | example |
111- | ------------------------- | ---------------------------------------------------------- | ------------------ |
112- | gitopen.gitlab.domain | The (web)domain name that will work for most of the people | gitlab.example.com |
113- | gitopen.gitlab.ssh.domain | A specific ssh domain name, *if needed* | git.example.com |
114- | gitopen.gitlab.ssh.port | A specific ssh port, *if needed* | 10022 |
115115
116116```sh
117- # use --global to set across all repos, instead of just the local one
118- git config [--global] gitopen.gitlab.domain [value]
119- git config [--global] gitopen.gitlab.ssh.domain [value]
120- git config [--global] gitopen.gitlab.ssh.port [value]
117+ git config [--global] open.[gitdomain].domain [value]
118+ git config [--global] open.[gitdomain].protocol [value]
121119```
122120
123- If your Gitlab custom hosted is serving `http` you can also specify this:
121+ **Example**
122+ * Your git remote is at `ssh://git@git.internal.biz:7000/XXX/YYY.git`
123+ * Your hosted gitlab is `http://repo.intranet/subpath/XXX/YYY`
124+
124125```sh
125- # use --global to set across all repos, instead of just the local one
126- git config [--global] gitopen.gitlab. protocol http
126+ git config [ --global] "open.https://git.internal.biz.domain" "repo.intranet/subpath"
127+ git config [--global] "open.https://git.internal.biz. protocol" " http"
127128```
128129
129130### Default remote
0 commit comments