0

After GitHub released this statement: "Support for password authentication was removed. Please use a personal access token instead" I enabled 2 factor authentication to my account. That resolved the issue for only one day and now every time i try to push to my repository i get this: 'https://': Could not resolve host: info

I've tried logging out & back in again, re-starting VScode, adding a keychain, deleting my cache & adding osxkeychain again, I have entered my username & email credentials, however, I am never promted for a password.

Any help would be greatly appreciated.

  • 3
    Does this answer your question? [Support for password authentication was removed. Please use a personal access token instead](https://stackoverflow.com/questions/68775869/support-for-password-authentication-was-removed-please-use-a-personal-access-to) – Gaël J Aug 14 '21 at 11:45
  • 1
    2 factor authentication is not related to using a personal access token. First is for manual login on the GitHub website, the other is for Git operations. – Gaël J Aug 14 '21 at 11:47
  • If you are getting an error about resolving a host named `info` while using an `https://` URL, you are probably using `https://info/something` as your URL. That is, you've specified that the *host name* for the machine you'd like to call up is `info`. That's not a valid host name, which is why you're getting the error, so check the URL you are using. – torek Aug 15 '21 at 01:28

1 Answers1

0

however, I am never prompted for a password.

That means your old password might still be cached by the credential manager.
Check the output of git config --global credential.helper

If is is osxkeychain, try:

printf "protocol=https\nhost=github.com" | git-credential-osxkeychain erase

(that, or explorer directly your KeyChain, or use security delete-internet-password)
Then try your git push again, and see if you are prompted for your token then.

Plus, make sure to use an URL based on the host for which your password is used:

 cd /path/to/repo
 git remote -v
 https://github.com/...
 # not
 https://info/...
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250