アカウント作成

https://github.com/

github1.png

SSH通信に使う鍵の作成

  1. 鍵の作成
    [~]$ cd .ssh
    [~/.ssh]$ ssh-keygen
    Generating public/private rsa key pair.
    Enter file in which to save the key (/Users/atsushi/.ssh/id_rsa):
    Enter passphrase (empty for no passphrase):
    Enter same passphrase again:
    Your identification has been saved in /Users/atsushi/.ssh/id_rsa.
    Your public key has been saved in /Users/atsushi/.ssh/id_rsa.pub.
     
    [~/.ssh]$ mv id_rsa id_rsa.github
    [~/.ssh]$ mv id_rsa.pub id_rsa.github.pub
    [~/.ssh]$ chmod 600 id_rsa.github.pub
     
    [~/.ssh]$ cat config
    identityFile ~/.ssh/id_rsa.app.example.com
    identityFile ~/.ssh/id_rsa.hondou.homedns.org
    identityFile ~/.ssh/id_rsa.github
  2. 鍵の登録
    github2.png
    id_rsa.github.pub を登録する
  3. /.ssh/config への登録

    HOST github.com
      User git
      HostName github.com
      IdentityFile ~/.ssh/id_rsa.github
    これで、この設定が
    $ git clone git@github.com:kagyuu/ANTLR4Exam.git
    で使われるようになる
  4. 確認
    [~/.ssh]$ ssh git@github.com
    The authenticity of host 'github.com (204.232.175.90)' can't be established.
    RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48.
    Are you sure you want to continue connecting (yes/no)? yes
    Warning: Permanently added 'github.com,204.232.175.90' (RSA) to the list of known hosts.
    PTY allocation request failed on channel 0
    Hi kagyuu! You've successfully authenticated, but GitHub does not provide shell access.
    Connection to github.com closed.
    うまくいかないようなら
    $ ssh git@github.com -i ~/.ssh/config/id_rsa.github
    を試してみる。これでうまくいくようなら .ssh/config が間違っているので修正してリトライ

Net Beans から既存の Project を PUSH する

  1. Clone
    1. [チーム]-[Git]-[Clone]
      github3.png
    2. プロジェクトの SSH の URL を指定する
      github5.png
       
      github4.png
    3. master の clone
      github7.png
    4. Clone 先 (Github で共有したいプロジェクト名にする)
      github6.png
    • (新規プロジェクトの場合には、↑ で指定したディレクトリ以下に Java プロジェクトを作ることが出来る (これで終わり))
  2. 既存のプロジェクトを Github 出共有する
    1. README.md だけが入っているディレクトリが出来ている
      [~/NetBeansProjects]$ cd maven-swap-plugin
      [~/NetBeansProjects/maven-swap-plugin]$ ls
      README.md
    2. 既存の maven-swap-plugin の内容をコピーする
      [~/NetBeansProjects]$ cp -r maven-swap-plugin(original)/* maven-swap-plugin
      [~/NetBeansProjects]$ cd maven-swap-plugin
      [~/NetBeansProjects/maven-swap-plugin]$ ls
      README.md	pom.xml		src		target
    3. [プロジェクトを開く] で、maven-swap-plugin を開く
      github8.png
    4. 共有されている資産になっている
      github9.png
  3. ローカルの Git レポジトリに commit する
    [NetBeans] ---(Commit)---> [Local] ---(Push)---> [Github]
               <--(Update)----         <--(Pull)----
    github10.png
     
    github11.png
  4. Github に push する
    github12.png
     
    github13.png
     
    github14.png
     
    github15.png
  5. Github の web ページからも Push した内容が見られるようになった
    github16.png
     
    github17.png

Wiki に説明文を書いてひとまず完了

github18.png

つたなくても英語で書かなきゃダメ・・・だよねぇ


Computer#Basic


添付ファイル: filegithub18.png 1758件 [詳細] filegithub17.png 1758件 [詳細] filegithub16.png 1755件 [詳細] filegithub15.png 1987件 [詳細] filegithub14.png 1970件 [詳細] filegithub13.png 2008件 [詳細] filegithub12.png 2013件 [詳細] filegithub11.png 1982件 [詳細] filegithub10.png 1978件 [詳細] filegithub9.png 2000件 [詳細] filegithub6.png 2029件 [詳細] filegithub8.png 2010件 [詳細] filegithub7.png 1866件 [詳細] filegithub5.png 1841件 [詳細] filegithub4.png 1615件 [詳細] filegithub3.png 1636件 [詳細] filegithub2.png 1789件 [詳細] filegithub1.png 1869件 [詳細]

トップ   編集 凍結 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS   sitemap
Last-modified: 2013-04-21 (日) 14:06:52 (4013d)
Short-URL:
ISBN10
ISBN13
9784061426061