LoginSignup
81
81

More than 5 years have passed since last update.

GitlabとSourceTreeのつなげ方

Last updated at Posted at 2014-04-15

■前提
・gitlabサーバー
・gitlabにプロジェクト作成済み(例:testprojectとする)
・sourcetreeインストール済み

■手順

1)gitlabのプロジェクトのGIT URLを取得、sourcetreeに新しいプロジェクトでクローンする
例)
GIT URL: git@192.168.1.xxx:gitlab_username/testproject.git

2) SSHキーをgitlabに貼り付ける
・SourceTreeメニューから Tools/Launch SSH Agentを選ぶ
・Pass Phraseを入力し、Generate Keyを選ぶ
・再生されたSSH KeyをGitlabのProfile Settings/SSH Keyに貼り付ける
・Launch SSH Agent画面のメニューからSSH KeyをExportする
・SourceTreeのTools/OptionsのGeneral/SSH Client Configurationから
SSH Keyをインポートする(SSH ClientをSSHにする)

3) SourceTreeからGitlabに最初のソースコード一式をあげる
・SourceTreeのRepository/Project SettingsからAddを押下する
・Remote NameをOriginにする
URL/PathはGitlabのプロジェクトのURLを追加する( 1)を参考)
・Branchesからdevelop/masterなどから右クリックし、push to originでソースコードをアップする

81
81
1

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
81
81