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

Fix Copy GitHub Permalink with custom SSH #6669

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

christianvuerings
Copy link

Fixes #6668

@christianvuerings christianvuerings force-pushed the fix-custom-ssh-copy-github-permalink branch from bab3f07 to e82bfaa Compare February 23, 2025 14:35
@@ -584,7 +584,7 @@ export function getUpstreamOrigin(upstream: Remote, resultHost: string = 'github
fetchUrl = fetchUrl.substr('ssh://'.length);
}
// upstream's origin by ssh
if (fetchUrl.startsWith('git@') && !fetchUrl.startsWith('[email protected]')) {
if ((fetchUrl.startsWith('git@') || fetchUrl.includes('@git')) && !fetchUrl.startsWith('[email protected]')) {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Issue was that we would only match [email protected]:organization/repo.git, not [email protected]:organization/repo.git

Open to other suggestions as well - e.g. matching .endsWith('.git') instead

@christianvuerings
Copy link
Author

@microsoft-github-policy-service agree

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.

Copy GitHub Permalink doesn't work with custom SSH
1 participant