0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【git】リモートにプッシュできなくなった

Last updated at Posted at 2025-02-19

リモートにプッシュしようとしたらこんなエラーが、、、

% git push origin develop
remote: Permission to hm/dividend-manager.git denied to h-0308.
fatal: unable to access 'https://github.com/hm/dividend-manager.git/': The requested URL returned error: 403

githubのアカウント2つ持ってるんだけどそのせいかな。
h-0308は別のアカウントです。

ChatGPTに聞いてみるとこのコマンドでGithubの認証情報をGitのキャッシュから削除できるみたい。

echo url=https://github.com | git credential reject

その後

git push origin develop

で無事リモートにプッシュできました。
ユーザ名とパスワード求められたのですが、その対応方法は別記事にあげます。

ありがとうございました。

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?