Git Linux

SSH接続

毎回

git clone https://####@git.codebreak.com/####/%%%%.git

と入力するのが面倒なので簡略化する。

SSH鍵の作成

$ cd ~/.ssh
$ ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/home/****/.ssh/id_rsa): &&&& (鍵の名前)
Enter passphrase (empty for no passphrase):(パスワードを入力)
Enter same passphrase again: (パスワードをもう一度入力)
Your identification has been saved in &&&&.(&&&&が秘密鍵)
Your public key has been saved in &&&&.pub.(&&&.pubが公開鍵)
The key fingerprint is:
(以後略)

SSH鍵をcodebreakの設定ページにコピー

  1. codebreakのアカウント設定からSSH公開鍵のページを開く。
  2. 「追加」ボタンを押す。
  3. 「名前」(適当な名前:&&&&.pubにしています)を入力する。
  4. 「公開鍵」の内容をペーストする。
  5. 「追加」ボタンを押す。

ローカルコンピュータの設定

~/.ssh/configファイルの設定

host ++++(好きな名前)
     user ####(codebreakのアカウント名)
     hostname git.codebreak.com
     port 22
     identityfile ~/.ssh/&&&&(秘密鍵)

共有リポジトリからの読み込み

git clone ssh://++++/####/%%%%.git

SSH鍵を作成したときのパスワードを入力する。

読み込まれれば成功


トップ   編集 凍結解除 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2015-05-06 (水) 14:19:08 (2880d)