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

  • Get the name of the current git branch with PowerShell
  • How do determine the URL of a remote git repo?
  • Git push to cPanel account - Push did not update modified file
  • Script to remove commits older than date specified
  • git: add line at the end of an existing commit without using editor
  • git reset --hard equivalent on bare 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

  • Is there a git hook that runs on git reset?
  • Github API languages endpoint
  • How can I have different versions of a file in the local working directory, remote working directory and git ftp target?
  • How to disconnect git for a project in intellij?
  • Clone from git server without ignore, but push to server with ignore
  • How to re-generate an unresolved git merge file
  • 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.