3
3

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 5 years have passed since last update.

既存リポジトリをGithubにpushするときにパスワードを求められたら

3
Posted at

手元のgitリポジトリを新しく作った自分のGithubリポジトリにpushしようとしたら、Githubにリポジトリを作ってからcloneした手順の時と異なり、pushのたびにユーザー名とパスワードを要求されるようになった。
originの設定が https://github.com/ 接続になってたりするので、SSH接続に変更してパスワードなしで行けるようにする。

Githubの該当リポジトリのトップページにある「HTTP / SSH / Git Read-only」から「SSH」を選択して表示されたURLをコピー。configに貼り付け。

ワーキングツリー/.git/config
[remote "origin"]
    url = git@github.com:calpo/LearnYouAHaskellForGreatGood.git

初めからgit remote add の時にこっちを指定しとけばいい話だけど、リポジトリ作成時に表示されるチュートリアルメッセージにはHTTPのURLが書いてあるのでついそのままコピーしてハマった。

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?