zeynel
zeynel

Reputation: 353

Permission denied error while setting up GitHub Pages

I'm following this page https://learntocodewith.me/tutorials/github-pages/ to create GitHub pages on MacBook Air (El Capitan) but when I do the last step I get this error:

$ git remote add origin 
https://github.com/azg357/azg357.github.io.git
$ GitHubPageTest a$ git push -u origin master
remote: Permission to azg357/azg357.github.io.git denied to zeynel1.
fatal: unable to access 
'https://github.com/azg357/azg357.github.io.git/': The requested URL returned error: 403
$ 

It looks like permission to access the repository is denied to "zeynel1". I use names like "zeynel" or "zeynel1" because it is my first name, but in this case, I haven't used it! I don't know where this is coming from.

Just before this error, OSX asks permission to give permission to GitHub to access "osxkeychain". Is this related to this? The message says something like "git-credential-osxkeychain" cannot be verified.

This is the copy of the entire session:

as-MacBook-Air:azeynel a$ cd /Users/a/GitHubPageTest 
as-MacBook-Air:GitHubPageTest a$ git init
Initialized empty Git repository in /Users/a/GitHubPageTest/.git/
as-MacBook-Air:GitHubPageTest a$ git add .
as-MacBook-Air:GitHubPageTest a$ git commit -m "first commit"
[master (root-commit) ad86580] first commit
1 file changed, 7 insertions(+)
create mode 100644 index.html
as-MacBook-Air:GitHubPageTest a$ git remote add origin 
https://github.com/azg357/azg357.github.io.git
as-MacBook-Air:GitHubPageTest a$ git push -u origin master
remote: Permission to azg357/azg357.github.io.git denied to zeynel1.
fatal: unable to access 
'https://github.com/azg357/azg357.github.io.git/': The requested URL returned error: 403
as-MacBook-Air:GitHubPageTest a$ 

Thanks!

.

Upvotes: 0

Views: 1549

Answers (1)

zeynel
zeynel

Reputation: 353

This was a problem caused by the cache on Key chain app. I deleted the stored GitHub items and it worked.

Upvotes: 1

Related Questions