Skip to content

Commit

Permalink
Added Docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric Magalhães authored and Eric Magalhães committed Jan 13, 2016
1 parent 8d6450a commit 0a97370
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 0 deletions.
Binary file added .DS_Store
Binary file not shown.
57 changes: 57 additions & 0 deletions Docs/CodeCommit CheatSheet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
Creating a SSH key for CodeCommit using the AWS CLI
------------
###General

In order to go through this tutorial make sure that you already have configures the AWS CLI in your machine and that your IAM User have Full Access permission on CodeCommit and permission to upload SSH Public Keys for IAM users.


###Creating the Repository
```
aws codecommit create-repository --repository-name aws-developer-fundamentals
```


###Generating the SSH Key:

```
cd ~/.ssh
ssh-keygen
# Folow the steps to create a key
```

###Upload SSH Key to IAM

```
aws iam upload-ssh-public-key --user-name [IAM User name] --ssh-public-key-body "$(cat [Key name .pub])"
#Example:
aws iam upload-ssh-public-key --user-name codecommit --ssh-public-key-body "$(cat codecommit.pub)"
```
###Setting the config file

```
touch config
chmod 600 config
vim config
```
Insert this information into the **config** file:

```
Host git-codecommit.*.amazonaws.com
User [SSHPublicKeyId]
IdentityFile ~/.ssh/[Key name]
#Example:
Host git-codecommit.*.amazonaws.com
User AWDLIJ12384O91K
IdentityFile ~/.ssh/codecommit
```

###Testing

```
ssh git-codecommit.us-east-1.amazonaws.com
```

0 comments on commit 0a97370

Please sign in to comment.