LoginSignup
9
7

More than 5 years have passed since last update.

GitHubにpush出来なかった件

Last updated at Posted at 2014-02-08

つまづいたので、覚書。

Set Up Git のページを見ながらユーザー名とメールアドレスを設定
https://help.github.com/articles/set-up-git

Create A Repo にならって、Hello Worldを作成する。
ただ、publicでしか作成できなかった。
https://help.github.com/articles/create-a-repo

ローカルにはgit cloneで持ってきた。

 $ git clone https://github.com/user_account/project_name.git

git pushしようとすると下記のエラーが発生。
could not read Username for 'https://github.com': No such file or directory

ググっていたら同一症状の人がいたので、ならってgitプロトコルで試してみる。
コマンドでURLを変更。

 $ git remote set-url git@github.com:user_account/project_name.git

git pushを試みる。。。エラー。

 Permission denied (publickey).
 fatal: Could not read from remote repository.

鍵の問題らしいので、生成してUP。
登録先は、ページの右上にある工具マークのところ。
ページが遷移したら「SSH Keys」。

 $ ssh-keygen -t rsa

これでPushしたらOKでした!

追記

@uasi様より情報頂きました。
当エラーはmsysgit 1.8.5.2のバグだそうです。
環境を確認してみたらまさにそれ。。。

参考で貼っていただいたURLもこちらの載せさせていただきました!

参考URL

  1. windowsのgit 1.8.5.2.で fatal: could not read Password for 'https://XXXXX':No such file or directoryのエラーになる
  2. Do not use _wfopen() for DOS device filenames #111
9
7
4

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