0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

AwsCodecommit+TortoiseGitをWindows環境でCloneする手順(SSH)

Last updated at Posted at 2020-03-18

環境:windows10Pro
目的:AWSCodeCommitにSSHキーあげてローカルにtortoisegitでクローンする
前提条件:gitとtortoiseGitインストール済み、AWSアカウント作成済み

1.Windowsのローカルでキー作成

コマンドプロンプトにてssh-keygenを起動して、キーを作成する。

c:\temp\sshkey>ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (C:\Users\xxxx/.ssh/id_rsa): C:\temp\sshkey\id_rsa
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in C:\temp\sshkey\id_rsa.
Your public key has been saved in C:\temp\sshkey\id_rsa.pub.
The key fingerprint is:

2.CodeCommitにキーをアップロード

「AWSコンソール > Iam > 認証情報 > SSHパブリックキーアップロード」にて1で作成したid_rsa.pubを設定し、SSH キー IDをメモする。(これがCodeCommitへの認証ユーザーになる)

3.puttykeyGenによるputtykey認証キーの作成

puttykeygen起動(tortoiseGitに標準でついてる)

C:\Users\xxxx>puttygen

メニュー > importkeyで1で作成したid_rsaを指定
savePriveteKeyを押して認証キーを保存

4.tortoiseGitでリポジトリクローン

tortoiseGitを起動し、クローンを選択したあと、URLと認証キーを設定すればOK

画面設定項目

URL:ssh:[CodeCommitのリポジトリURL]
putty認証キー:[3で作成した認証キー]

補足

接続の度に「login as」とログインユーザーをきかれる場合は、リモート設定のURLに直接ユーザー名「SSHキーID」をつけておくいい(標準のtortoisegitPlinkを使ってSSHしているとき)
ssh://[ユーザーID]@[リポジトリURL]
image.png

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?