1. Sourceforge.jpについて
1.1 Sourceforge.jpとは
Sourceforge.jpは、日本向けのオープンソース開発ポータルです。
ユーザー登録することでSourceforge.jp上の様々な開発プロジェクトに参加することができます。また、自分自身が新しいプロジェクトを登録することもできます。
僕自身は、aglibというPHP用のライブラリ作成プロジェクトを登録しています。
1.2 Sourceforge.jpとssh
Sourceforge.jpではsshを使っています。
サーバーにログインしたり、CVSでソースを登録するときはsshを通して接続します。そのため、sshを使うためにSourceforge.jpにカギを登録する必要があります。
2. カギの作成と登録
2.1 カギの作成(Linux)
ここではLinuxサーバ上でsshのかぎを作成する方法を説明します。
なぜLinuxサーバ上でカギを作成するかというと、phpDocを自動Uploadするためです。自動Uploadについては別のページで説明します。
以下の手順で、sshカギを作成します。
- ssh用キー作成コマンドを実行します。
[atsushifx@agartha tmp]$ ssh-keygen -b 2048 -C atsushifx@aglabo.com -f identity -t rsa
- パスフレーズを聞いてきますので、パスフレーズを入力します。
Generating public/private rsa key pair.
Enter passphrase (empty for no passphrase): ********
Enter same passphrase again: ********
- カレントディレクトリ上のファイル
identity,identity.pubを.sshディレクトリに移動します。
[atsushifx@agartha tmp]$ cp identity* ~/.ssh/
以上でカギの作成は終了です。
作成したカギをSourceforge.jpに登録します。
以下の手順でカギを登録します。
- Sourceforge.jpにアクセスします。
- ログインします。マイ・ページが表示されます。
- アカウント管理をクリックし、[鍵の編集]をクリックします。
CVS/SSHで共有する公開鍵の画面が表示されます。
- テキストボックス内に先ほど作成したファイル"identity.pub"の内容をはりつけます。
- 更新をクリックし、鍵の内容を反映させます。
以上でカギの登録は終了です。
2.3 ログインチェック
キーが正常に動作するかチェックするためにsshでSourceforge.jpにログインします。
以下の手順でSourceforge.jpにログインします。
- 以下のようにしてsshを起動します。
[atsushifx@agartha tmp]$ ssh -l atsushifx shell.sourceforge.jp
- 以下の表示が出ますので、yesと入力します。
hostが登録されます。
The authenticity of host 'shell.sourceforge.jp (61.215.208.26)' can't be established.
RSA key fingerprint is 15:22:46:69:9f:ac:14:68:8a:be:f1:e4:29:7c:a9:51.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'shell.sourceforge.jp,61.215.208.26' (RSA) to the list of known hosts.
- パスフレーズ入力プロンプトが表示されます。
パスフレーズを入力し、Enterを押します。
Enter passphrase for key '/home/atsushifx/.ssh/identity': ********
- Sourceforge.jpにログインします。
Linux sf-usr-shell 2.4.27-vaj #1 SMP 2004年 8月 10日 火曜日 18:03:58 JST i686 unknown
Most of the programs included with the Debian GNU/Linux system are
freely redistributable; the exact distribution terms for each program
are described in the individual files in /usr/share/doc/*/copyright
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
atsushifx@sf-usr-shell:~$
上記のようにshellにログインできればカギは正常に登録されています。
|