user image

Mohamed Atef
Published in : 2021-12-20

[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 Date : 2022-03-05

Best answers

34

Best answers

34

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

Leave a comment

Join us

Join our community and get the chance to solve your code issues & share your opinion with us

Sign up Now

Related posts

Convert Stored Procedure of Oracle to SQL Server
Publish date: 2022-03-02 | Comments: 1

Tag: General

Where can I find cheap Java and Mysql hosting server?
Publish date: 2022-05-03 | Comments: 3

Tag: General

Connecting jupyter notebook with Android studio
Publish date: 2022-03-05 | Comments: 1

Tag: General

docker elastic builder exited with code 127?
Publish date: 2022-02-27 | Comments: 2

Tag: General

Searching for free live chat service
Publish date: 2022-02-11 | Comments: 2

Tag: General