nikita mullick
nikita mullick

Reputation: 127

unable to change git credentials

I recently signed up with github to gitlab account.I was pushing the projects earlier with some other user's credentials but now I want to use my own github account. I changed the user name and email with

 git config --global user.name <myusername>
 git config --global user.email <myemail>

Well I can push as myusername now but the activities i do don't reflect in my profile.Infact they are reflected in the previous user account mentioning Authored by <myname> while contributions are shown under his name. When I open my account my contributions are none.

I checked out on the other posts about removing windows credentials but my device hasn't stored any git credentials.I am not able to get what is the problem and how to solve this.

Upvotes: 1

Views: 173

Answers (1)

VonC
VonC

Reputation: 1330102

First, set your remote URL with the right user account in it:

cd /path/to/my/local/repo
git remote set-url origin https://[email protected]/myGitLabAccount/myrepo.git

Second, check your git credential helper:

git config credential.helper

If set, that helper should prompt you for your GitHub password, and cache it.

Upvotes: 2

Related Questions