LoginSignup
0
0

Cloud9で環境を作る(Github連携)

Last updated at Posted at 2023-11-03

AWS ConsoleからCloud9を選択
image.png

新しい環境を作成を押下
image.png

image.png
image.png
image.png

IDEを開く
image.png

ターミナルを開き、下記コマンドでssh keyを生成する

 $ ssh-keygen -t ed25519 -C 'your.email@example.com'
Generating public/private ed25519 key pair.
Enter file in which to save the key (/home/ec2-user/.ssh/id_ed25519): langchainlambda-on-cloud9
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in langchainlambda-on-cloud9.
Your public key has been saved in langchainlambda-on-cloud9.pub.
The key fingerprint is:
SHA256:xxxxxxxx your.email@example.com
The key's randomart image is:
+--[ED25519 256]--+
|      .          |
|     = .         |
|    B o          |
|   . = .   o     |
|    = o S = o    |
|   * @   o o .   |
|  . % E .   .    |
|   BoBoo ..o     |
|   oO=B*=+o..    |
+----[SHA256]-----+

生成したpubキーの中身を確認する

$ cat langchainlambda-on-cloud9.pub 

下記URLにアクセスし、[New SSH Key]にpubキーの中身を設定する
https://github.com/settings/keys

image.png

生成した鍵ファイルを移動

$ mv ./langchainlambda-on-cloud9* ~/.ssh/

ssh設定を行う

vim ~/.ssh/config 

下記をconfigファイルに張り付けるて、:wq を入力

Host github.com
    User git
    IdentityFile ~/.ssh/langchainlambda-on-cloud9

接続確認

$ ssh -T git@github.com
The authenticity of host 'github.com (20.27.177.113)' can't be established.
ECDSA key fingerprint is SHA256:xxxxxxxxxxxxxxx
ECDSA key fingerprint is MD5:xxxxxxxxxxx
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'github.com,20.27.177.113' (ECDSA) to the list of known hosts.
Hi Hamanuma! You've successfully authenticated, but GitHub does not provide shell access.

git cloneを実行

$ git clone git@github.com:Hamanuma/LangChainLambda.git

下記はやっといた方がよさそう

npm install -g c9

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