So, when I use HTTPS method for cloning git repository and do some changes and push
or pull
to git it will always be prompting me for username and password
. what's the solution for that?
Asked
Active
Viewed 1,032 times
1

Harsh Patel
- 6,334
- 10
- 40
- 73
-
I found the solution! – Harsh Patel Aug 29 '17 at 06:22
-
What do you mean by "resolve this"? What are you asking? – Code-Apprentice Aug 29 '17 at 06:27
-
@Code-Apprentice now it's ok? – Harsh Patel Aug 29 '17 at 08:25
-
What kind of solution do you want? What would you rather do? – Code-Apprentice Aug 29 '17 at 14:48
-
2Possible duplicate of [Is there a way to skip password typing when using https:// on GitHub?](https://stackoverflow.com/questions/5343068/is-there-a-way-to-skip-password-typing-when-using-https-on-github) – phd Aug 29 '17 at 15:53
2 Answers
1
Apart from changing to SSH, you can also keep using HTTPS, if you don't mind to put your password in clear text. Put this in your ~/.netrc and it won't ask for your username/password (at least on Linux and Mac)
Make one .netrc
file in your home directory.
machine github.com
login <user>
password <password

Harsh Patel
- 6,334
- 10
- 40
- 73
-
What do you mean by don't mind putting password in clear text? Do you mean netrc uses cleartext? – CyberMew Dec 02 '20 at 02:34
1
The solution to your problem is this git command which is kind of remember me of GIT.
git config credential.helper store
Read this for details: GIT credentials store

Muhammad Noman
- 136
- 1
- 6