facebook twitter hatena line email

Git/bitbucket

提供: 初心者エンジニアの簡易メモ
2016年1月28日 (木) 17:45時点におけるAdmin (トーク | 投稿記録)による版 (リポジトリ作成)

移動: 案内検索

bitbucketとは

プライベートなgitが無料で無制限に使えるサービス

リポジトリ作成

グローバルヘッダー/リポジトリ/リポジトリの作成/リポジトリ名をproject1と入力

bitbucketに公開鍵を追加する

  1. グローバルヘッダー/右上の個人設定/bitbucket_setting/sshキー/鍵を追加
  2. 接続元pcの公開鍵の文字列を"キー"部分に入れる
vi ~/.ssh/id_rsa.pub

接続テスト

$ ssh -T git@bitbucket.org
logged in as [ユーザ名]
You can use git or hg to connect to Bitbucket. Shell access is disabled.
# 上記2行が出れば接続されている

プロジェクト作成とpush

cd project1
git init
git remote add origin ssh://git@bitbucket.org/[ユーザ名]/project1.git
git add readme.txt
git commit -m "first commit"
git push origin master

参考

http://www.task-notes.com/entry/20150210/1423537200