LoginSignup
8
7

More than 5 years have passed since last update.

Stashでsshを利用した接続を行う

Last updated at Posted at 2013-07-18

Attlassian社から提供されるStash はgitでSSHを利用して接続する方法が設定可能です。
しかしながらその設定方法が微妙に分かりづらいので、SSH鍵の作成からStash上でのSSH公開鍵登録を行い、 git clone を行うまでの手順を記述します。

ssh鍵の作成

ssh-keygen を実行してssh鍵を設定します。

localhost@root:.ssh $ ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/root/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /Users/root/.ssh/id_rsa.
Your public key has been saved in /Users/root/.ssh/id_rsa.pub.
The key fingerprint is:
c3:d5:3d:4c:1e:33:4c:57:26:1f:3e:c1:5f:04:a7:69 root@localhost
The key's randomart image is:
+--[ RSA 2048]----+
|                 |
|         . .     |
|          + . . .|
|         . . . = |
|        S   = E .|
|         . + B.o |
|          = + +oo|
|         . o . o=|
|               .o|
+-----------------+

結果id_rsaと'id_rsa.pub'が生成されます。
```bash

StashでSSH接続を許可する。

SettingsからServer settingsを選択します。

kobito.1374119656.956094.png

SSH access が有効になっている事を確認します。

kobito.1374119737.626081.png

Stash上へSSH公開鍵の登録

右上の個人画像から Manage account を選択します。
kobito.1374056672.678438.png

SSH Keys を選択します。
capture 2013-07-17 19.30.15.png

id_rsa.pub の内容をコピーしKeyとして貼付けます。
capture 2013-07-17 19.31.46.png

すると、リポジトリのcloneをする際に、 SSHHTTP の指定を選べるようになります。

kobito.1374119576.860093.png

以上です。

参考サイト

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