Personal access token for garuda gitlab

Today GitLab asks first time for personal access token in the terminal for HTTP.
I have GitLab ssh key in .ssh

Why they do that ??? Damn.

 >>> cd iso-profiles                                                                                                                         
~/iso-profiles >>> git add .                                                                                                      ±[●][master]
~/iso-profiles >>> git commit -m "i3wm Packages-Desktop garuda-zsh-config .."                                                     ±[●][master]
[master dc5ad3b] i3wm Packages-Desktop garuda-zsh-config ..
 1 file changed, 13 insertions(+), 11 deletions(-)
~/iso-profiles >>> git push origin master                                                                                        ±[A1][master]
remote: HTTP Basic: Access denied
remote: You must use a personal access token with 'read_repository' or 'write_repository' scope for Git over HTTP.
remote: You can generate one at https://gitlab.com/profile/personal_access_tokens
fatal: Authentifizierung fehlgeschlagen für 'https://gitlab.com/garuda-linux/tools/iso-profiles.git/'

they ask for Password not token (in https, not HTTP Basic), but the token must be put in for the Password.

I like it.

On the other hand, nobody is perfect, not even GitLab programmers.

Username for 'https://gitlab.com': SGSm
Password for 'https://SGSm@gitlab.com': 
warning: Leite nach https://gitlab.com/garuda-linux/tools/iso-profiles.git/ um
Objekte aufzählen: 9, Fertig.
Zähle Objekte: 100% (9/9), Fertig.
Delta-Kompression verwendet bis zu 8 Threads.
Komprimiere Objekte: 100% (5/5), Fertig.
Schreibe Objekte: 100% (5/5), 558 Bytes | 558.00 KiB/s, Fertig.
Gesamt 5 (Delta 4), Wiederverwendet 0 (Delta 0), Pack wiederverwendet 0
To https://gitlab.com/garuda-linux/tools/iso-profiles
   7ab7320..dc5ad3b  master -> master

Then I got a warning for the redirection to HTTPS where I have the SSH key. :man_facepalming: :man_facepalming: :man_facepalming:

Does somebody know if I need now all the time this cryptic 20 char token?
Or how to fix it.
I think I changed nothing, but I can also be wrong :wink:

Personal access tokens are required when Two-Factor Authentication (2FA) is enabled.

2 Likes

■■■■ It is so secure that you can not work anymore with GitLab :slight_smile: :wink: :slight_smile:

"Personal access tokens

When 2FA is enabled, you can no longer use your normal account password to authenticate with Git over HTTPS on the command line or when using GitLab’s API. You must use a personal access token instead."

Very nice, maybe I over-read in 2FA this point or they do not talk about.

So, I delete the 2FA ■■■■ and work fine via ssh on terminal.

3 Likes