![]() ![]() Git remote set-url that the remote URL has changed. $ git remote -vorigin (fetch)origin (push)Ĭhange your remote's URL from HTTPS to SSH with the remote set-url command. List your existing remotes in order to get the name of the remote you want to change. mraghunathan November 20, 2021, 2:02am 1 errors: remote: HTTP Basic: Access denied fatal: Authentication failed for ' cannot push to remote. Change the current working directory to your local project. Switching remote URLs from HTTPS to SSH Open Terminal (for Mac and Linux users) or the command line (for Windows users). You can use a credential helper so Git will remember your GitHub username and password every time it talks to GitHub. If you have two-factor authentication enabled, you must create a personal access token to use instead of your GitHub password. The next time you git fetch, git pull, or git push to the remote repository, you'll be asked for your GitHub username and password. $ git remote -vVerify new remote URLorigin (fetch)origin (push) List your existing remotes in order to get the name of the remote you want to change.Ĭhange your remote's URL from SSH to HTTPS with the remote set-url command. ![]() The git remote set-url command takes two arguments:Īn existing remote name, for example, origin A new URL for the remote, for example: if you're updating to use if you're updating to use SSH Switching remote URLs from SSH to HTTPS Open Terminal (for Mac and Linux users) or the command line (for Windows users). Tip: For information on the difference between HTTPS and SSH URLs, see "Which remote URL should I use?" ![]() Git ssh_exchange_identification: read: Connection reset by peer fatal 报错解决方案Ĭhanging a remote's URL The git remote set-url command changes an existing remote repository URL. Git config -system -unset credential.helper Git remote set-url origin git remote remote set-url origin git remote -v Git remote set-url origin(远程仓库名称) 2、从https切换至ssh ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |