When I do "git pull" on the Linux Ubuntu server to pull the changes from my repo, it always asks me for my GitHub account username and password. How can I save these credentials to the server forever?
Asked
Active
Viewed 360 times
-2
-
https://docs.github.com/en/get-started/getting-started-with-git/caching-your-github-credentials-in-git#git-credential-manager. Note that it's a bit different for mac, windows and linux. – ElpieKay Jul 18 '22 at 07:44
-
I edited to Linux Ubuntu server, thanks – Ahmed Samna Jul 18 '22 at 07:45
-
https://stackoverflow.com/search?q=%5Bgit%5D+cache+credentials – phd Jul 18 '22 at 10:16
1 Answers
1
git config --global user.name <username>
git config --global user.email <xxx@mail.com>
git config credential.helper store
Note: first time it will ask for the credentials

Anas Khan
- 34
- 5
-
when execute the third command, I got: "fatal: not in a git directory" – Ahmed Samna Jul 18 '22 at 07:50
-