Skip to content

feat: private remote git auth#232

Open
piotr-roslaniec wants to merge 9 commits intogetsentry:mainfrom
piotr-roslaniec:feat/private-remote-git-auth
Open

feat: private remote git auth#232
piotr-roslaniec wants to merge 9 commits intogetsentry:mainfrom
piotr-roslaniec:feat/private-remote-git-auth

Conversation

@piotr-roslaniec
Copy link

Please see specs/private-remote-auth-rollout.md

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

lower.includes('access denied') ||
lower.includes('403')
);
}
Copy link

Choose a reason for hiding this comment

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

Overly broad '403' match in auth failure detection

Medium Severity

The isGitAuthFailure function includes lower.includes('403') which is overly broad. A GitHub 403 can indicate rate limiting rather than an authentication or authorization problem. When a token is provided but the failure is actually rate limiting, the error message will misleadingly say "Failed to authenticate when cloning" and tell the user to check their token's read access — sending them on a wild goose chase instead of surfacing the real issue.

Fix in Cursor Fix in Web

execGit(['fetch', '--depth=1', '--', repoUrl], { cwd: remotePath, env: gitAuthEnv });
} else {
execGit(['fetch', '--depth=1', '--', repoUrl], { cwd: remotePath });
}
Copy link

Choose a reason for hiding this comment

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

Redundant conditional branches in update fetch path

Low Severity

The if (useGitHubAuth) ... else ... branches in the update path are functionally identical. gitAuthEnv is already undefined when !useGitHubAuth, so passing { env: gitAuthEnv } in both cases produces the same result. This could be collapsed into a single execGit call with { cwd: remotePath, env: gitAuthEnv }.

Fix in Cursor Fix in Web

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.

1 participant