File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -105,6 +105,12 @@ To configure GitLab support you need to set `gitopen.gitlab.domain`:
105
105
git config [--global] gitopen.gitlab.domain [yourdomain.here]
106
106
```
107
107
108
+ If your Gitlab custom hosted is serving `http` you can also specify this:
109
+ ```sh
110
+ # use --global to set across all repos, instead of just the local one
111
+ git config [--global] gitopen.gitlab.protocol http
112
+ ```
113
+
108
114
## Related projects / alternatives
109
115
110
116
See [hub](https://github.com/github/hub) for complete GitHub opening support.
Original file line number Diff line number Diff line change 93
93
# custom GitLab
94
94
gitlab_domain=$( git config --get gitopen.gitlab.domain)
95
95
gitlab_port=$( git config --get gitopen.gitlab.port)
96
+ gitlab_protocol=$( git config --get gitopen.gitlab.protocol)
97
+ if [ -z " $gitlab_protocol " ]; then
98
+ gitlab_protocol=http
99
+ fi
96
100
if [ -n " $gitlab_domain " ]; then
97
101
if grep -q " $gitlab_domain " <<< $giturl ; then
98
102
99
103
# Handle GitLab's default SSH notation (like git@gitlab.domain.com:user/repo)
100
- giturl=${giturl/ git\@ ${gitlab_domain} \: / https :// ${gitlab_domain} / }
104
+ giturl=${giturl/ git\@ ${gitlab_domain} \: / ${gitlab_protocol} :// ${gitlab_domain} / }
101
105
102
106
# handle SSH protocol (links like ssh://git@gitlab.domain.com/user/repo)
103
- giturl=${giturl/# ssh\:\/\/ / https :// }
107
+ giturl=${giturl/# ssh\:\/\/ / ${gitlab_protocol} :// }
104
108
105
109
# remove git@ from the domain
106
110
giturl=${giturl/ git\@ ${gitlab_domain} / ${gitlab_domain} / }
You can’t perform that action at this time.
0 commit comments