VOOZH about

URL: https://qiita.com/tanishilove/items/3164ecf3f16585fa3bf2

⇱ GitHub リポジトリに git push したら Permission が denied #403 - Qiita


👁 Image
39

Go to list of users who liked

34

Share on X(Twitter)

Share on Facebook

Add to Hatena Bookmark

More than 5 years have passed since last update.

@tanishilove(田螺LOVE☆)

GitHub リポジトリに git push したら Permission が denied

39
Last updated at Posted at 2017-02-10

よく知られていることかもしれませんが,自分への備忘録として書いておきます.

GitHub (アカウント hoge) でリポジトリ ("abc") 作成: hoge/abc

GitHub で以下のように提示されるとおり

echo "# abc" >> README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/hobe/abc.git
git push -u origin master

git push すると

$ git push origin master
remote: Permission to hoge/abc.git denied to fuga.
fatal: unable to access 'https://github.com/hoge/abc.git/': The requested URL returned error: 403

ローカル側に何らかの理由で fuga という別アカウントが紐付いている?

取り急ぎ解決策として

$ git remote set-url origin https://hoge@github.com/hoge/abc.git
$ git push origin master
Password for 'https://hoge@github.com': 

パスワード入れると無事に push されました(^^)

39

Go to list of users who liked

34
2

Go to list of comments

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
39

Go to list of users who liked

34