What should I do if I want to enter a password every time git is submitted in Ubuntu?

  

In the Ubuntu system, many users report that when using Git, they often encounter the need to enter passwords frequently. They are required to enter the password each time they submit the code. After entering the correct password, they can log in normally. Use git. Many users feel that it is very troublesome to enter a password every time they submit. So, what should I do to enter a password every time git submits in Ubuntu system? How to avoid it?

Buju following operations:

1: cd carriage; user enters the current directory;

2: vim .git-credentials (if not installed vim You can also install one with sudo apt-get install vim using other editors)

3: Enter the content in the following format:

https://{username}:{password}@github. Com

where username, password, and github.com are replaced with your own content

4: Save the exit and execute the following command

git config --global credential.helper Store

After executing

/home/username/.gitconfig will add a new

helper = store

This is to execute git push again /pull will not ask you to enter a password.

Of course, there is another way to use git@git (ssh) instead of https://in git clone. This way you can also avoid losing your password every time.

Finally, if you are on the Mac os x or Uindows platform, you can also use the ide tool like sourcetree, but now you have to FQ to download.

The above is the solution for git to enter the password every time the git is submitted in Ubuntu system. Users who need it can refer to the method described above to avoid the trouble of git entering the password every time it is submitted.

Copyright © Windows knowledge All Rights Reserved