Help us understand the problem. What is going on with this article?

gitで起きたエラーの解決法

More than 1 year has passed since last update.

今回起こったこと

railsチュートリアルをやっている最中にgit commitしようとしたら
思わぬエラーが発生した。

*** Please tell me who you are.

Run

  git config --global user.email "you@example.com"
  git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

fatal: unable to auto-detect email address (got '○@○Air2.(none)')

要はあなたは誰ですか状態だったらしい。
gitの初期設定ができてないみたい。。(以前に何回かcommitしてるのだが。。。)

解決策

エラー文を見れば分かる通り、gitに自分を分からせるために
gitに登録しているアドレスと、ユーザーネームを指定してあげればいい。
ターミナルで以下を実行

$git config --global user.email ここに自分のアドレス
$git config --global user.name ここに自分の名前

アドレスと名前の部分は""が無くても大丈夫みたい。

とりあえずこれで再度pushしてみると
いけました!!!

w-tdon
フロントエンドエンジニア 勉強中
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした