diff --git a/extensions/github/src/pushErrorHandler.ts b/extensions/github/src/pushErrorHandler.ts index 379a8fd32a7..30a5c64d8e9 100644 --- a/extensions/github/src/pushErrorHandler.ts +++ b/extensions/github/src/pushErrorHandler.ts @@ -166,8 +166,8 @@ export class GithubPushErrorHandler implements PushErrorHandler { return false; } - const match = /^https:\/\/github\.com\/([^/]+)\/([^/]+)\.git/i.exec(remoteUrl) - || /^git@github\.com:([^/]+)\/([^/]+)\.git/i.exec(remoteUrl); + const match = /^https:\/\/github\.com\/([^/]+)\/([^/]+)(?:\.git)?/i.exec(remoteUrl) + || /^git@github\.com:([^/]+)\/([^/]+)(?:\.git)?/i.exec(remoteUrl); if (!match) { return false;