LoginSignup
6
5

More than 5 years have passed since last update.

Githubで遭遇したエラーメモ

Posted at

エラー1

以下のようにエラーが出てしまった場合

# git push -u origin master
To git@github.com:kuredev/xxxxxxxxxxx.git
 ! [rejected]        master -> master (fetch first)
error: failed to push some refs to 'git@github.com:kuredev/xxxxxxxxxxx.git'
ヒント: Updates were rejected because the remote contains work that you do
ヒント: not have locally. This is usually caused by another repository pushing
ヒント: to the same ref. You may want to first integrate the remote changes
ヒント: (e.g., 'git pull ...') before pushing again.
ヒント: See the 'Note about fast-forwards' in 'git push --help' for details.

以下で解決。ライセンスファイルを作成してしまった場合
【開発環境】GitHubへのpushが「fetch first」と表示されてrejectedとなったときの対処: 映画と旅行とエンジニア http://www.wakky.tech/article/433518761.html

エラー2

コミット時に以下のようなエラーが出た場合。出力メッセージにしたがってメールアドレス等を登録すればいい。

$ git commit -m "First 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 'kure@ubuntu.(none)')
6
5
1

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
6
5