Sign in

[Permission denied] Problem for Github

I had a big problem, “Permission denied” when I tried to push it to my repository on Github.

In conclusion, you can do this command.

$ git remote set-url origin myNameForGithub@github.com/myNameForGithub/myRepositoryName.git$ git push origin master
Password for 'https://myNameForGithub@github.com':yourPassWord

Use your own expressions for the following ones.

・myNameForGithub

・myRepositoryName

You know, this is the kind of problem I encountered when I was developing an open-source program.

$ git push origin masterremote: Permission to someoneUserNameForGithub/someoneRepositoryName.git denied to myNameForGithub.fatal: unable to access 'https://github.com/someoneUserNameForGithub/someoneRepositoryName.git/': The requested URL returned error: 403

This error occurs no matter how many times I push.

So I’ll share a temporary solution.

Well, it would be fine if we could push it.

$ git remote set-url origin myNameForGithub@github.com/myNameForGithub/myRepositoryName.git
$ git push origin master
Password for 'https://hoge@github.com':yourPassWord
~~ellipsis~~* [new branch] master -> master

Yeah! I could push!!

Then, I can create a branch and develop it right now.

Enjoy coding👋