git enter password before push/pull

Our company is using git for source control and on my machine I can push and pull to the server without entering a password everytime, however one of my colleagues has to repeatedly enter a password which is very annoying, does anyone know how to fix this?

Thanks in advance

  • git rebase after git revert
  • Step through a file's history in git; similar to p4v timelapse
  • `git blame/annotate`: terminate on merge commits
  • Squash the first two commits in Git?
  • Checkout old commit and make it a new commit
  • Git add Folder with Existing Git Repository
  • EDIT:
    We are not using github and we already have the ssh public keys from all the users in the authorized_keys file in the .ssh folder in the git user home directory. I didn’t do anything special for my computer, just added the ssh key like the other computers, yet I am the only one who doesn’t have to repeatedly enter the password

  • cannot pull Git remote repository from Sourcetree
  • Git rebase commit selection
  • VS2013 - GIT not working
  • Ansible task - clone private git without SSH forwarding
  • Preview changes on bare repo doesn't work correctly
  • How do you find who merged a git commit into a branch?
  • 4 Solutions collect form web for “git enter password before push/pull”

    This is probably done by setting a password when generating your id_rsa key pair. There is some documentation on github about how to set this up with a password. If you wanted to up your key pair without a password then do the following commands.

    cd ~/.ssh
    ssh-keygen -t rsa -C ""

    When prompted to enter a password when generating the key just leave it blank and hit enter.

    It depends on whether it’s asking for a password or passphrase. I’d guess it’s the latter. In that case, it means the keypair that’s being used for authentication was created with a passphrase. If that keypair isn’t used for anything else, it’s safe to just generate another and overwrite it using


    followed by pressing Enter three times. If you don’t want to overwrite an existing one, let me know, and I’ll tell you about the options there.

    Then, whether it was originally asking for a password or passphrase, you’ll need to add the public half of the new keypair, located at ~/.ssh/, to the git server you’re trying to push to. If it’s a gitosis or gitolite server, which it probably is, you’ll have to give the public key to someone who has admin permission so they can add it to the server. If it’s just a plain Linux box with a normal git repo on it (probably not), you can use

    ssh-copy-id user@host

    It will ask for your password this time, but not again thereafter.

    That should cover the most likely scenarios. If it seems to not, give me more details, and I should be able to help you out.

    The other option is to keep the password on your key but use ssh-agent to store the password for the duration of a session.

    You will want to add his public key to the authorized_keys file which is located in that git user’s ~/.ssh/authorized_keys file.

    1. Make sure he has an ssh-key file created
    2. scp git_user@servername:~
    3. ssh into the server as that git user: ssh git_user@servername and enter password.
    4. cat >> authorized_keys

    That will add his key to the authorized keys and he shouldn’t have to enter a password.

    Git Baby is a git and github fan, let's start git clone.