-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Michael Woodside
authored and
Michael Woodside
committed
Sep 25, 2024
1 parent
3b4d6a0
commit 91d6b83
Showing
2 changed files
with
33 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,9 @@ | ||
# 2024-09-25-Github SSH Keys | ||
--- | ||
layout: post | ||
title: "Adding a Private Repo to ARGOCD with SSH Keys" | ||
categories: [DevOps, ARGOCD] | ||
--- | ||
Categories : {{page.categories | capitalize | join: ', '}} | ||
|
||
Hey Guys, | ||
|
||
|
@@ -8,15 +13,15 @@ Turns out there are a few different ways to do this, and they include SSH Keys, | |
|
||
Now if you are connecting alot of different repos, I would highly recommend deploying a Github App so that it handles all of the authentication for all of your repos. however since we are just doing this in a test cluster we decide that SSH keys will work just fine. | ||
|
||
#### Generate New keys | ||
### Generate New keys | ||
|
||
So step 1 in the process is to generate new keys for your repo, I would highly recommend using a different key for each repo if possible. Below is the command we used to generate a new key for Github using the recommended algorithm of ED25519 256 | ||
|
||
`ssh-keygen -t ed25519 -C "[email protected]"` | ||
|
||
This command should prompt you for a storage location and a passphrase, **Currently (September 2024) ARGOCD does NOT support Passphrases on SSH Keys**. | ||
|
||
#### Add Keys to GitHub | ||
### Add Keys to GitHub | ||
|
||
Once you have generated the key you should have to new files, a private key and a public key. You will need to add your public key to the repo so that Argo can authenticate. | ||
|
||
|
@@ -28,7 +33,7 @@ Step 3. Add new Deploy key. Give the new Key a name and insert the contents of t | |
|
||
![image.png](/images/github-new-keys.png) | ||
|
||
#### Add repo to ArgoCD | ||
### Add repo to ArgoCD | ||
|
||
Now that you have added an SSH Deploy key to your repo, you can map the private repo into argo. For this you will need the SSH Path of the repo ( looks something like [email protected]:USER/REPO-NAME.git) , the value of the private key and a name for your Repo in ARGOCD | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- | ||
layout: page | ||
permalink: /categories/ | ||
title: Categories | ||
--- | ||
|
||
|
||
<div id="archives"> | ||
{% for category in site.categories %} | ||
<div class="archive-group"> | ||
{% capture category_name %}{{ category | first }}{% endcapture %} | ||
<div id="#{{ category_name | slugize }}"></div> | ||
<p></p> | ||
|
||
<h3 class="category-head">{{ category_name }}</h3> | ||
<a name="{{ category_name | slugize }}"></a> | ||
{% for post in site.categories[category_name] %} | ||
<article class="archive-item"> | ||
<h4><a href="{{ site.baseurl }}{{ post.url }}">{{post.title}}</a></h4> | ||
</article> | ||
{% endfor %} | ||
</div> | ||
{% endfor %} | ||
</div> |