1

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?

Harsh Patel
  • 6,334
  • 10
  • 40
  • 73

2 Answers2

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
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