-
-
Notifications
You must be signed in to change notification settings - Fork 99
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
Disable interactive credential prompt for git resolver #411
Disable interactive credential prompt for git resolver #411
Conversation
The option doesn't need to be an absolute path. I also changed it to |
Maybe add a comment explaining this both :) I read the diff first and was very confused, as you need to know that the setting takes a command rather than a boolean value and that it's still overridable :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So counterintuitive to read core.askPass=true
as do not ask me for credentials. 😅
Resolves #316
Git repository requests over HTTP can result in 401 Authentication Required status code. This is typically the case when a repository is private. Some git providers also return this status code when a repository exists to avoid disclosing the existence of private repositories.
By default,
git clone
prompts for credentials when it receives a 401 status code. Whenshards install
usesgit clone
, this leads to unexpected and misleading behaviour.shards install
is not meant to be used interactively, so this prompt should be completely disabled.This PR implements this by using the environment variable
GIT_ASKPASS
set to a value resulting in false. It can still be overriden by setting the environment variable.