Search code examples
gitbashsshgitlabvpn

Asking for password when pushing to gitlab?


I have a number of commits on my laptop and I am trying to push these to gitlab through a ShrewSoft VPN. However, every time I try to push the code I am asked for a password in my git bash. I have tried using my VPN password but it just throws an error. I added my SSH key in yesterday and it was all working fine but today it is not working and i'm not too sure why!!

Any ideas on what the password should be, and why I am asked for it in the first place?

Thanks.


Solution

  • The password is the gitlab password, look at the remote_url,

    git config --get remote.origin.url
    

    If it's of the type

    git@github.com:jcjohnson/neural-style.git
    

    Then you should check your local ssh key if it's in the right location : https://help.github.com/articles/checking-for-existing-ssh-keys/

    If the url is of the type

    https://github.com/jcjohnson/neural-style.git
    

    You should set your global user and password in git

    https://help.github.com/articles/why-is-git-always-asking-for-my-password/