Skip to content
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

Supports separate URLs in the repo and the web #56

Merged
merged 3 commits into from
Jan 4, 2017

Conversation

elim
Copy link
Contributor

@elim elim commented Nov 4, 2016

On a GitLab server.

ex.


  • repo
    • git@git.example.com:namespace/project.git
  • web
    • https://gitlab.example.com/namespace/project

Then,

$ git config gitopen.gitlab.domain gitlab.example.com
$ git config gitopen.gitlab.ssh-domain git.example.com
$ git open

Then open the web url in your web browser.

On a GitLab server.

ex.
---

repo: git@git.example.com:namespace/project.git
web:  https://gitlab.example.com/namespace/project

$ git config gitopen.gitlab.domain gitlab.example.com
$ git config gitopen.gitlab.ssh-domain git.example.com
$ git open
@ffes
Copy link
Collaborator

ffes commented Nov 9, 2016

I have no personal need for this, but the code still works for our internal gitlab.

But is gitopen.gitlab.ssh-domain the right name for this option?

There is also gitopen.gitlab.port which was added in #51 and appears to be an alternative ssh port that can be filtered out (looking at the code, not mentioned in the readme)

Therefore I would suggest to rename gitopen.gitlab.ssh-domain to gitopen.gitlab.ssh.domain and rename gitopen.gitlab.port to gitopen.gitlab.ssh.port to keep the two in line.

So that would result in these three options:

gitopen.gitlab.domain       # the (web)domain name that will work for most of the people
gitopen.gitlab.ssh.domain   # A specific ssh domain name, if needed
gitopen.gitlab.ssh.port     # A specific ssh port, if needed

Shouldn't there be a line or two in the readme to explain these ssh options?

@paulirish
Copy link
Owner

i have no experience with gitlab so defer to others.

+1 on adding some notes to the readme. @elim can you do that?

@ffes
Copy link
Collaborator

ffes commented Nov 13, 2016

But @paulirish, you must have an opinion on how the settings should be organized for this.

Note that what I wrote above is a proposal to change the settings. I am willing to create a PR to rewrite the gitlab ssh port setting.

@elim
Copy link
Contributor Author

elim commented Nov 18, 2016

@ffes @paulirish Thank you for your interest. I am sorry that the reply was delayed.
I think @ffes opinion (changing the option name and appending to the README) is a good thing.
I will change that way. Please give me some time.

@elim
Copy link
Contributor Author

elim commented Nov 19, 2016

How about adding the following to the README?

#### GitLab support

To configure GitLab support you need to set some options.

| option name               | description                                                | example            |
| ------------------------- | ---------------------------------------------------------- | ------------------ |
| gitopen.gitlab.domain     | The (web)domain name that will work for most of the people | gitlab.example.com |
| gitopen.gitlab.ssh.domain | A specific ssh domain name, *if needed*                    | git.example.com    |
| gitopen.gitlab.ssh.port   | A specific ssh port, *if needed*                           | 10022              |

```sh
# use --global to set across all repos, instead of just the local one
git config [--global] gitopen.gitlab.domain [value]
git config [--global] gitopen.gitlab.ssh.domain [value]
git config [--global] gitopen.gitlab.ssh.port [value]
```

Sample: https://gist.github.com/elim/b816f4fc5892fbaa0105cdddcbd07ad1

@ffes
Copy link
Collaborator

ffes commented Nov 21, 2016

LGTM!

@elim
Copy link
Contributor Author

elim commented Nov 21, 2016

@ffes Thanks!
I added explanations to this pull-request ( 8ce4938 )

@paulirish paulirish merged commit 1976483 into paulirish:master Jan 4, 2017
@paulirish
Copy link
Owner

thanks!

and @ffes i'm adding you as a maintainer. huge thanks for your help on the gitlab items!

@elim elim deleted the feature/separate-url-gitlab branch January 4, 2017 01:38
@ffes ffes mentioned this pull request Jun 16, 2017
iblea pushed a commit to iblea/git-open that referenced this pull request Jun 17, 2024
Supports separate URLs in the repo and the web
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants