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
Automaticlly prompt password input when it need #310
Comments
We are already discussing a better check for this kind of connection errors in #285. But there is no easy option to distinguish between an invalid password or an invalid username – in both cases curl returns But what we could do is checking if any auth information is given (password, ssh key, keychain). If not we could prompt password input before we even send a request. This should also work with So we would have 3 cases:
|
@dertanzschuh I think it's quite difficult to detect every possible authentication. For example, curl can auto-detect the location of the SSH key. We would need to re-implement that detection to see if there is a key and it may not be the right one. If we can easily see that it's a curl error 67, we could at least say: "Access denied. Did you mistype the URL, username or password?" |
As far as I know curl can only detect the public key, but the private key must be set with
So we could assume key auth is used if a private key is set, regardless of a public key, couldn’t we?
Yes, we can. But I think this is the fix for the other issue I mentioned. 😉 |
Sometims I just type
But not work, then I found that this sftp need password (some sensitive vps).That tip message doesn't looks like saying I missing the password, just not so friendly.
Then I remmenber to type
git ftp push -P
(easy forgot)I think it would be much better to prompt password input when authentication failed.
The text was updated successfully, but these errors were encountered: