LoginSignup
2
1

More than 5 years have passed since last update.

bitbucketでチーム開発を始める手順

Posted at

用意するもの

  • mac (windowsの場合はGit bashを入れておくと良い)
  • VSCode

bitbucketのアカウントを作成する

こちらよりアカウントを各自作成する
https://bitbucket.org/

ssh公開鍵、秘密鍵の作成

下記のコマンドで公開鍵、秘密鍵が~/.ssh/配下に作成されます。

cd ~/.ssh/
ssh-keygen -t rsa -f filename

configの設定

~/.ssh/configに以下記述し保存

Host bitbucket.org
  User git
  Port 22
  HostName bitbucket.org
  IdentityFile ~/.ssh/filename # filenameは秘密鍵を指定
  TCPKeepAlive yes 
  IdentitiesOnly yes
  ForwardAgent yes
Host ホスト名
HostName ホスト
User ログインユーザ
IdentityFile 秘密鍵
Port ポート(デフォルトは22)
TCPKeepAlive 接続状態を保持する場合はyes
IdentitiesOnly IdentityFileが必要な場合はyes
ForwardAgent ssh-agentを利用する

bitbucketに登録

  • view profile > 設定 > 鍵を追加
  • label は 鍵の名を追加
  • keyは以下を実施したうえ貼り付け
cat ~/.ssh/filename.pub | pbcopy .

bitbucketからローカルPCにClone

あらかじめ管理者でリポジトリを作成した上、以下のコマンドでclone

git clone git@bitbucket.org:team_name/project.git

書き込みができるか確認

ファイルの書き込みができるかcloneしたフォルダ内で確認

touch test.txt
git add .
git ci -m "first commit"
git push origin master

bitbucket > プロジェクト > リポジトリ
コミットが表示されていれば初期設定完了

2
1
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
2
1