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

Change the URL used in "Open File in Remote" and "Copy Remote File URL" #3975

Open
dushan-terzikj-grammarly opened this issue Jan 23, 2025 · 0 comments
Labels
feature New feature or request triage Needs to be looked at

Comments

@dushan-terzikj-grammarly

Hello all,

I am using Gitlens on VSCode on Mac and I am a noob with VSCode. When I use "Open File in Remote" or "Copy Remote File URL", I get the following URL (this is an example):

"https://ssh.my.gitlab-server.com/..."

While this is not incorrect as I cloned the repo via SSH, I cannot open this link I have to remove the ssh. part. This is not a blocker but it is quite annoying. How can I make Gitlens generate the correct link?

Correct link: "https://my.gitlab-server.com/..."

I tried adding gitlens.remote in settings as such:

"gitlens.remotes": [
    {
      "domain": "my.gitlab-server.com",
      "type": "GitLab",
      "protocol": "https",
      "urls": {
        "repository": "https://my.gitlab-server.com/${repo}",
        "branches": "https://my.gitlab-server.com/${repo}/branches",
        "branch": "https://my.gitlab-server.com/${repo}/commits/${branch}",
        "commit": "https://my.gitlab-server.com/${repo}/commit/${id}",
        "file": "https://my.gitlab-server.com/${repo}?path=${file}${line}",
        "fileInBranch": "https://my.gitlab-server.com/${repo}/blob/${branch}/${file}${line}",
        "fileInCommit": "https://my.gitlab-server.com/${repo}/blob/${id}/${file}${line}",
        "fileLine": "#L${line}",
        "fileRange": "#L${start}-L${end}"
      }
    }
  ]

This does not fix the issue.

Thank you in advance!

Discussion here: #3961

@dushan-terzikj-grammarly dushan-terzikj-grammarly added feature New feature or request triage Needs to be looked at labels Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request triage Needs to be looked at
Projects
None yet
Development

No branches or pull requests

1 participant