0

I can login to github using my username and password. I recently cloned one of my repos using HTTPS and did a change. However, when I want to push:

  • I am shown the prompt Username for 'https://github.com': . I write my username. Then it asks for Password for 'https://username@github.com':. But my username is not https://username@github.com':. It is username. Anyways, it does not work when I use the same password and username that I used during logging in to github.
  • My config has the line in the form of remote.origin.url=https://github.com/username/some-repo.git . It's as it was when I cloned the first time using HTTPS.
  • I already tried adding https://username@github.com/username/some-repo.git . It is no different than providing the username in prompt. It somehow still thinks that my username is https://username@github.com.

I don't understand why this is always an issue for me and I always switch to using SSH despite that HTTPS is the default way. In my opinion there should be a way to use HTTPS not only for cloning the repo but also pushing afterwards. I always had an issue and opted in an ad-hoc solution and never solved this due to my laziness, but here I am going the extra mile.

1 Answers1

2

Github has removed the option to use a username-password combination.

https://github.blog/changelog/2021-08-12-git-password-authentication-is-shutting-down/

You should switch to ssh instead which is much better

CodeWizard
  • 128,036
  • 21
  • 144
  • 167