user

Mohamed Atef

20 Dec 2021

[solved] Unable to pull updates from git "sudo git pull"

General

Unable to pull updates from git "sudo git pull", Today I faced an issue when I was trying to pull the updates from my repo, that's on my live server so after some searching on the internet I found this line to update the access token of reaching the github repo

sudo git remote set-url origin //[TOKEN]@github.com/[USERNAME]/[REPO_NAME].git

this will update the pulling URL & the access token and the issue solved successfully 
 

Comments

Rakshit

5 Mar 2022

This is really nice solution. 

In addition, If someone want to see what other repository or branches existing inside it, it can be done using below command. It will list down your all existing remotes.

git remote -v

For the comment (as given below), adding repository path is best way to copy paste it, it will avoid typos. So we can use above command for that.

sudo git remote set-url origin //[TOKEN]@github.com/[USERNAME]/[REPO_NAME].git

© 2024 Copyrights reserved for web-brackets.com