0

This might be trivial, but it has caused me a ton of headaches over the last few days. Recently i have tried to clone my git repos onto my new computer, but up until now, with no succes. After typing "git clone " followed by the respective git URL, my comand line is asking for my Username and passwort. Even though i provide both correctly, i get the following error:

enter image description here

I do not have 2FA enabled, and as i understand it, the access token is only required in the case of enabled 2FA.

Does anyone have any idea what i am doing wrong?

torek
  • 448,244
  • 59
  • 642
  • 775
  • Access token *was* only required if you had 2FA enabled. Now it is required for all. See the provided link. https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ Perhaps on your old machine you were using ssh keys? – Schwern Jan 07 '22 at 08:18
  • Note that while this particular kind of access token is specific to GitHub, it seems that most Git hosting services are moving in the same direction here. – torek Jan 07 '22 at 22:14

1 Answers1

2

A token is not jsut required for 2FA.

It is now (since mid 2021) required for any web operation with authentication, using said token as a password.

You need to create a PAT (Personal Access Token), with scope 'repo'.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Thank you very much for your answer. Could you elaborate on that a little more? Is it enough if i just create the token in github and than use it as my "passwort"? – YanKlinkenick Jan 09 '22 at 08:59
  • @YanKlinkenick Yes, that is the idea. On the difference between a token and a regular account password, see [this answer](https://stackoverflow.com/a/19223896/6309). – VonC Jan 09 '22 at 12:23