0

When I try to push my changes to my repo I get below error,

remote: Permission to ankalk/vue-js-task-tracker.git denied to anka-mimac

But when I run the git config --list I get below, no reference to anka-mimac

user.name=Anka Offi
user.email=ankalk@myemailaddress.com
filter.lfs.clean=git-lfs clean -- %f
filter.lfs.smudge=git-lfs smudge -- %f
filter.lfs.process=git-lfs filter-process
filter.lfs.required=true
core.editor=code --wait
core.autocrlf=input
diff.tool=vscode
difftool.vscode.cmd=code --wait --diff $LOCAL $REMOTE
alias.lg=log --pretty=format:'%an committed %h'
merge.tool=p4merge
mergetool.p4merge.path=/Applications/p4merge.app/Contents/MacOS/p4merge
credential.helper=osxkeychain

Also I have tried this command to check the authentication I get successfully authenticated message.

ssh -T git@github.com

You've successfully authenticated, but GitHub does not provide shell access.

I have gone through so many articles but couldnt find a solution for this.

torek
  • 448,244
  • 59
  • 642
  • 775
Asanka
  • 483
  • 2
  • 8
  • 21

1 Answers1

0

Thanks you @akaabdullahmateen, your linked helped me.

I have deleted the old account details from KeyChain,

https://docs.github.com/en/get-started/getting-started-with-git/updating-credentials-from-the-macos-keychain

And then Created a PAT in Git Hub https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token

And used this command I found in below article. Where to store my Git personal access token?

git config --global credential.helper manager-core

and made a innitial push and entered my email and then the PAT when prompted to enter the password.

It worked for me.

Asanka
  • 483
  • 2
  • 8
  • 21