@@ -103,27 +103,28 @@ git-open can automatically guess the corresponding repository page for remotes
103
103
- Visual Studio Team Services
104
104
- Team Foundation Server (on-premises)
105
105
106
- ### GitLab support
106
+ ### Configuration ( GitLab support)
107
107
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`) |
109
114
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 |
115
115
116
116
```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]
121
119
```
122
120
123
- If your Gitlab custom hosted is serving `http` you can also specify this:
121
+ **Example**
122
+ * Your git remote is at `ssh://[email protected] :7000/XXX/YYY.git`
123
+ * Your hosted gitlab is `http://repo.intranet/subpath/XXX/YYY`
124
+
124
125
```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"
127
128
```
128
129
129
130
### Default remote
0 commit comments