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?

More than 1 year has passed since last update.

push時の「error: failed to push some refs to」についてのメモ

Posted at

Pushしようとしたころエラーが発生

Gitで新規リモートリポジトリを作成し、そこへファイルをpushしようとしたところ、下のエラーが発生

error: failed to push some refs to 'リポジトリ名'

いろいろと調べてみたが、解決せず。。。

解決方法

最近PCを新調してGitをインストールしなおしたので、もしやユーザー情報が紐づいていないのでは!?と思い、
以下のコマンドを実行

git config --global user.email "gitに登録しているメールアドレス"
git config --global user.name "gitのユーザー名" 

その後、push実行

git push -u origin main

無事Pushできました(;^_^A

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?