fabiospampinato/vscode-open-in-github

`Remote repository not found` error

Opened this issue · 2 comments

Thank you for making the extension.
When I use Open in GitHub... command in my company project, it works fine.

However, when I use it on my side project, it shows Remote repository not found error.
I'm using multiple SSH keys for these projects.

Can you help me to set the extension properly?

@coolneo4u could you check if v2 fixed the issue for you?

If it doesn't: do you get a reasonable output (can you share it?) if you run the git remote -v command?

I have the same problem with the latest version of the extension, but it worked in version 1.3.

I suspect the issue in the latest version is due to different handling of custom SSH keys.

When I run git remote -v, I get the following output:

git@github.com-ProfileName:company/project.git

This is my SSH configuration:

Host github.com-ProfileName
    HostName github.com
    User git
    IdentityFile ~/.ssh/rsa_key 

I'm not sure how this extension works, but you can compare version 1.3 with the latest version to identify the changes.
Essentially, you should remove any ProfileName from the URL.

So, change:

git@github.com-ProfileName:company/project.git
to:

git@github.com:company/project.git

And then open the specific page using this repository address.