2009-12-07
githubで複数のリポジトリを管理するときにはまったこと
はまったこと
% git remote show jkc ERROR: Permission to voidy21/JavaKusoCode denied to voidy21/dotfiles. fatal: The remote end hung up unexpectedly
とか言われて何もpushとかさせてもらえない状態になった
結論から言うと
それぞれのリポジトリのDeploy KeysとAccountのPublic Keysは同じものを使ってはいけない!
逆に言えば、アカウントを持っている張本人の場合、Public Keyさえ登録すればDeploy Keyは登録する必要が無いということです!
以下個人用メモ(Ubuntuでgithubを使う場合)
ssh公開鍵を作る
% cd ~
% ssh-keygen
~/.ssh/id_rsa.pubをコピーしてhttps://github.com/accountのSSH Public Keysから追加登録
remoteリポジトリを登録
% cd (作業用ディレクトリ) % git remote add (名前) (URL)
例) git remote add github git@github.com:voidy21/dotfiles.git
ローカルな環境にコミットとかする
% git init
% git add .
% git commit -m 'first commit'
githubにpush!!!
% git push github master
トラックバック - http://d.hatena.ne.jp/voidy21/20091207/1260201278
リンク元
- 628 http://pipes.yahoo.com/pipes/pipe.info?_id=tDfBdGWF3RGl9XNm1L3fcQ
- 118 http://pipes.yahoo.com/pipes/pipe.info?_id=12e453e301454b799b3ac6642aa089b5
- 26 http://www.google.co.jp/search?hl=ja&client=firefox-a&rls=org.mozilla:ja:official&hs=pJM&q=fstream+c++&lr=lang_ja&aq=0&oq=fstream c
- 9 http://www.google.co.jp/search?hl=ja&client=firefox-a&rls=com.ubuntu:ja:unofficial&hs=py1&q=Linuxキーボード&btnG=検索&lr=
- 9 http://www.google.co.jp/search?hl=ja&lr=lang_ja&client=firefox-a&rls=org.mozilla:ja:official&q=adblock+?????潟?????&revid=973277844&ei=w0kdS_yGFIuK6gPjurXIDw&sa=X&oi=revisions_inline&resnum=0&ct=top-revision&cd=4&ved=0CAkQ4QIoAw
- 7 http://www.google.co.jp/search?q=github+ubuntu&ie=utf-8&oe=utf-8&aq=t&rls=com.ubuntu:ja:unofficial&client=firefox-a
- 6 http://www.google.com/custom?hl=en&client=pub-2070091971271392&channel=7979263543&cof=FORID:13;AH:left;CX:9%2E04%20Start%20Page;L:http://www.google.com/intl/en/images/logos/custom_search_logo_sm.gif;LH:30;LP:1%3
- 4 http://mitsukuni.org/blog/2009/04/09/gaeでcron/
- 4 http://pipes.yahoo.com/pipes/pipe.info?_id=02db597254ec68550537866a2fca2ce6
- 4 http://reader.livedoor.com/reader/




