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 https://[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 https://[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

Is it possible to git commit files without adding a message or comments?
Publish date: 2022-03-02 | Comments: 2

Tag: General

Select from a query with peewee
Publish date: 2022-03-05 | Comments: 0

Tag: General

How to checkout to new created branch on bitbucket
Publish date: 2022-03-03 | Comments: 1

Tag: General

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

Tag: General

Is there any port I need to allow in google VM instances to allow SMTP?
Publish date: 2022-02-14 | Comments: 1

Tag: General

How do i r etrieve users?
Publish date: 2022-03-04 | Comments: 0

Tag: General

Chrome shows cursor everywhere where I click?
Publish date: 2022-03-11 | Comments: 2

Tag: General