run git pull without prompting for password

1

I would like to know if there is a possibility of me caching my password for my git user so I will not be prompted for the password every time I perform a git pull from the server, remembering that I am not allowed to change the server settings

// Update

I use command line via linux shell and I'm not using git hub git server is installed on a server and always prompts for password at the time of pull

Objective I have a Shell Script that updates 5 projects at once but it requests 5 times the password msame would like to pass something by parameter such as git pull origin master --nopassword or git pull origin master --password 12345

    
asked by anonymous 18.11.2016 / 13:27

2 answers

1

I remembered that I had this problem and found the solution here: link

It may be because you have the wrong URL, using https or git instead of ssh :

The correct URL:

[email protected]/username/repo.git

Other common but may generate this error:

https://github.com/username/repo.git
git://github.com/username/repo.git
    
18.11.2016 / 13:46
0

You have a temporary password command: git config credential.helper cache , or command to save the password permanently: git config credential.helper store . The first saves the credentials in cache for 5 minutes (default). The second guard permanently.

The difference between the one and the other is the security risk: If you are not the only one accessing the computer, maybe git config credential.helper cache is better because your credentials will not be exposed to other users of the machine after you finish your edits .

Determine how credentials are stored: git config credential.helper store or git config credential.helper cache .

The next time you make a git push , your credentials will be stored.

Sources: git-credential-store , git-credential-cache .

    
01.12.2016 / 13:57