This will make `ssh://git@<host>:<port>/<user>/<repo>` URLs
intermediately look like `git@<host>:<user>/<repo>` and
expose these to further processing/substitution.
Properties required for proper working are:
* `gitopen.gitlab.domain`
* `gitopen.gitlab.ssh.port`
The username prefix ‘username@bitbucket.org/*’ caused a phishing error
on Safari which persisted across page visits on BitBucket, unless the
username was manually deleted from url.
* Add http protocol for Gitlab custom host
* default to https
* Revert "default to https"
This reverts commit b25190b5d1.
* Revert "Merge branch 'master' into http"
This reverts commit 18573f8b29, reversing
changes made to 88a9e254ae.
* Revert "Revert "Merge branch 'master' into http""
This reverts commit fa0e6d1f21.
* Revert "Revert "default to https""
This reverts commit d754476010.
In my ssh config if specified that all connections with github.com should use the `git` user. So when cloning a repo I can type:
```bash
git clone github.com:paulirish/git-open.git
```
instead of
```bash
git clone git@github.com:paulirish/git-open.git
```
This PR contains a fix for repos that have been cloned without specifying the `git` user.
You need to add another config option to remove the port, but this is now working for me. Could be improved by adding an option for the protocol as well, I'm using `http` instead of `https`, I've left that as is for now though.
Stash remote URLs always contain /scm/, I'm using that to detect a repo
hosted on Stash. The web URL for Stash repos is using a different
format, where it inserts "projects" and "repos" to separate the project
and the repo.
I had to move the branch detection to the top, since Stash is using a
different format for selecting the branch.
I've only tried this with HTTPS URLs, not with git: URLs - there's
probably some more code needed for this.