github設定

設定ファイル関連をgitで管理することに。
先ずは、アカウントを作って各種設定。
ここを参照にして。

公開鍵の登録

# 鍵作成
$ ssh-keygen -t dsa -C "メールアドレス"
# 鍵登録 (.pubファイルを貼り付ける)
https://github.com/account/ssh
# 確認
$ ssh -T git@github.com

基本設定

$ sudo yum -y install git
# token確認
https://github.com/account/admin
$ TOKEN=00000000000000000000000000000000
$ git config --global user.name "Firstname Lastname"
$ git config --global user.email "メールアドレス"
$ git config --global github.user username
$ git config --global github.token $TOKEN

リポジトリ作成

# 新規リポジトリ作成
https://github.com/repositories/new

# commit
$ mkdir psychobil.ly
$ cd psychobil.ly
$ git init
$ touch README
$ git add README
$ git commit -m 'first commit'
$ git remote add origin git@github.com:psychobilly/psychobil.ly.git
$ git push -u origin master

ssh config

$ cat ~/.ssh/config
Host github.com
  User git
  Hostname github.com
  PreferredAuthentications publickey
  IdentityFile ~/.ssh/id_dsa