LoginSignup
0
0

More than 5 years have passed since last update.

git pushしたら403が返ってきた

Posted at

状況

  • GitHubのアカウントがいくつかある
  • デフォルトで使っているものと違うアカウントのリポジトリなので git config でユーザー名とメールアドレスを変えた
  • 初プッシュ
  • remote: Permission to jigen098/hoge.git denied to fuga.

解決策

git remote -v で出てくるURLにユーザー名つける

origin  https://github.com/jigen098/hoge.git (fetch)
origin  https://github.com/jigen098/hoge.git (push)

このURLのgithub.comの前に下の例みたいにユーザー名つける

git remote set-url origin https://jigen098@github.com/jigen098/hoge.git

0
0
0

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
0
0