简体   繁体   中英

Git: How to change password of credentials used to clone a repository

I am working on linux and I clone a private repository using my github account credentials. But over the period of time my password has changed for github and whenever I try to use git pull it is giving me an error remote: Invalid username or password.

How can I change the password which I used while cloning the repository for the first time?

You the issue an git remote -v and check what kind of auth you are using. I always use git protocol (which uses SSH). You can freely edit those remote urls in ./git/config file. I believe you cloned it using HTTP (or using SSH w/o .ssh key file being present).

If you want to use SSH, you can follow this: https://help.github.com/articles/generating-ssh-keys

Then you will never need to worry about passwords again.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM