Vscode-gitlens: Open File in Remote and Copy Remote File URL do not work with GitHub Enterprise

Created on 24 Sep 2018  路  10Comments  路  Source: eamodio/vscode-gitlens


  • GitLens Version: 8.5.6
  • VSCode Version: 1.27.2
  • OS Version: Win 10

Steps to Reproduce:

  1. Attempt to run either command from a GitHub Enterprise repository
  2. Contents doesn't get copied to your clipboard, or brower opened. "Copy URL for to Clipboard from..." appears in Command Pallet but nothing typed works and no suggestions loaded.

I am assuming that this has to do with authentication into GitHub Enterprise to query for the URL. Another note is that we are using ssh not https for the remote url.

needs more info

Most helpful comment

Solved it -- I did not have the remote configured in gitlens.remotes.

"gitlens.remotes": [{ "domain": "git.corporate-url.com", "type": "GitHub" }]

Found the docs!

Glad this works already, but I'm a little bummed, I thought this might be a good first hacktoberfest PR ;)

All 10 comments

What does your remote url look like?

I'm also having this issue, however we do have an https url for the remote. It looks like https://our.gh.enterprise.url.here/org/repo, as you would expect.

When using "Open In Remote" I'm then presented with an input with the placeholder text Open {filename} in.... If I try to type anything here and hit enter, or any other combination, nothing happens.

That quick pick list is empty, and looking at the code it seems it should be providing me with a list of remote to choose from, must be a problem with getting the remote list.

Solved it -- I did not have the remote configured in gitlens.remotes.

"gitlens.remotes": [{ "domain": "git.corporate-url.com", "type": "GitHub" }]

Found the docs!

Glad this works already, but I'm a little bummed, I thought this might be a good first hacktoberfest PR ;)

Hehe -- we could work on a PR that adds support for unknown remotes and allows configuring it to be added into the gitlens.remotes 馃槃

FYI, if you are interested in a PR please make sure to target the develop branch as that will be the next version of GitLens.

@eamodio

I really like this feature, but when i use Copy Remote File URL to Clipboard, the url is remote url without commit id, would you like to add command Copy Remote File URL With Commit ID to Clipboard? Becouse the line number may change at next commit.

I am closing this issue because I believe it is working as intended.

Solved it -- I did not have the remote configured in gitlens.remotes.

"gitlens.remotes": [{ "domain": "git.corporate-url.com", "type": "GitHub" }]

Found the docs!

Glad this works already, but I'm a little bummed, I thought this might be a good first hacktoberfest PR ;)

I solved this by the same method with some difficulties, so record my experience here in case someone need. My corporate using gitlab, so "type": "GitHub" doesn't work, "type": "GitLab" works.

"gitlens.remotes": [{ "domain": "git.corporate-url.com", "type": "GitHub" }]

workd for me as well 馃憤
image

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

robertzauner picture robertzauner  路  3Comments

dwlsalmeida picture dwlsalmeida  路  3Comments

ridhwaans picture ridhwaans  路  3Comments

derrickstolee picture derrickstolee  路  3Comments

DFelten picture DFelten  路  3Comments