Skip to content

Instantly share code, notes, and snippets.

@paosidufygthrj
Last active August 29, 2015 14:27
Show Gist options
  • Save paosidufygthrj/1e41726728327e9aaab3 to your computer and use it in GitHub Desktop.
Save paosidufygthrj/1e41726728327e9aaab3 to your computer and use it in GitHub Desktop.
gisty 導入メモ

gisty 導入メモ

gisty とは

http://github.com/swdyh/gisty

gist をコマンドラインから利用しやすくするツール。 ファイルの新規投稿や、投稿したファイルをローカルにクローンできる。

導入手順

おおまかな手順は以下のとおり。

  • インストール
  • GitHub API アクセストークン取得
  • GitHub SSH 公開鍵登録
  • 環境変数設定

インストール

% gem install gisty

GitHub API アクセストークン取得

こちらの解説を参考に以下の username 部分を GitHub アカウントIDに変えて実行する。 続けてパスワードをきかれるので入力するとアクセストークンが取得できる。

% curl -u 'username' -d '{"scopes":["gist"],"note":"gisty"}'  https://api.github.com/authorizations

https://github.com/settings/tokens で取得したアクセストークンが表示されていれば成功。

GitHub SSH 公開鍵登録

こちらを参考に登録。 既に登録済みのかたはスキップ。

環境変数設定

環境変数に gist を保存するディレクトリとアクセストークンを登録。

export GISTY_DIR="$HOME/dev/gists"
export GISTY_ACCESS_TOKEN="アクセストークン"

git も設定。

% git config --global github.user アカウントID
% git config --global github.token アクセストークン

特に問題がここまでの手順で gisty が使用できるようになる。


2015/8/14 作成

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment