'PhpStorm asks each time for a username and password for GitHub

I work with the operating system Linux-Mint and PhpStorm. Every time I make a push, fetch, pull etc. with PhpStorm, PhpStorm asks me for a username and password. I have already created a GitHub user in the PhpStorm settings, I have also created an SSH key and a personal token - unfortunately PhpStorm still asks for the data.

I tried the whole thing on a Windows 10 system. I was asked for my data only once, then entered it and it worked. Shortly after I got a notification from GitHub that a personal token was created.

Why doesn't this work with Linux (Mint)? Who can help me?



Solution 1:[1]

For me what worked is, setting token auth in git repo. Set origin with following

git remote set-url origin https://[TOKEN]@github.com/[PATH TO REPO].git

Now Github doesn't support password auth, so this is the preferred way.

If you don't have the token already then need to set that in profile, for that you can follow the guide https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token

Solution 2:[2]

in the project file:

  1. select the option to reveal the hiden files.
  2. you will see a hidden git folder.
  3. Open the git folder.
  4. you will see a file named config.txt
  5. open it and check the url value
  6. put it like that: url = https://user:[email protected]/path/to/repo.git
  7. save and close it.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 APu
Solution 2 Maykel Contreras Camacho