LoginSignup
4
3

More than 5 years have passed since last update.

Keybaseを使って暗号化 git repositoryを作ろう

Last updated at Posted at 2017-10-07

private repository欲しいときありますね

  • 発表前の研究
  • 小説
  • プライベートファイル or プロジェクト
  • APIキー
  • シークレット
  • ビジネスドキュメント

gitは便利だしバージョン履歴が残るし、もっと使いたい。
でもGithub private repositoryはお金がかかるし、情報漏洩とか不安。
そう思ったことはないでしょうか。
そこでKeybaseを使いましょう。

先日、公開鍵基盤のKeybaseがencrypted gitをローンチしました
Keybaseアプリを使うと完全に暗号化されたprivate repositoryを作ることができます。

Keybaseの登録方法

https://keybase.io/download

作成したアカウントを Github, Twitter, Facebook, Redditなどなどで認証を行う必要があります。
私はgistで登録しました。

encrypted git の作り方

new personal repositoryを選びます

personal-repo.png

repository名を入力する

create-new-repo.png

repository登録完了

repo-has-been-created.png

git clone

git clone keybase://private/wshino/mogemoge

encrypted git のいいところ

  • 認証がとれたデバイスでしか利用できません。うっかり他の端末からのアクセスを防げます。
  • エンドツーエンドで暗号化されています。中間経路で悪さができません。
  • リポジトリ名やブランチ名も暗号化されています。Keybaseサーバー側もレポジトリ名を知りません。
  • pushしたデータはデバイスが持つ秘密鍵で署名されています。もし、ハッキングで盗まれても秘密鍵がないと復元できません。

encrypted git の残念なところ

  • 今はGUIツールがありません。GUIが欲しい人は好きなクライアントを使いましょう。
    • Github Desktop
    • SourceTree
    • IntelliJ
  • PRとかissueもない。

既存のgitをencryptedにする方法

# 1. make the encrypted remote repo
keybase git create sbt-rpm

# 2. get your old stuff into a temp directory
git clone --mirror https://github.com/wshino/sbt-rpm _tmp.git

# 3. head north of the wall
cd _tmp.git

# 4. push onward, to Craster's keep
git push --mirror keybase://private/wshino/sbt-rpm

# 5. back to Winterfell; kill some boltons
cd .. && rm -rf _tmp.git

# 6. DONE. You can clone anywhere and find this repo in the Keybase app
git clone keybase://private/wshino/sbt-rpm

Keybaseにはチャットツールが付いているので議論は便利かもしれません。

その他

  • 容量のリミットは1アカウント100GB
  • 1チームごとにも100GB
  • commitに署名はしていない
4
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
4
3