Skip to content

Commit 60c2414

Browse files
committed
Finish instructions for OpenSSH
1 parent 86fb37d commit 60c2414

File tree

1 file changed

+17
-16
lines changed

1 file changed

+17
-16
lines changed

_posts/2023-01-11-ssh-key-github-windows-powershell.md

+17-16
Original file line numberDiff line numberDiff line change
@@ -8,32 +8,33 @@ tags: development powershell windows git github ssh
88
I've been a long-time fan of Linux and MacOS for development, but I recently set a challenge for myself to set up my development environment in Windows PowerShell. One part of that is working with Git and repositories in GitHub.
99

1010
## Step 1: Install and configure OpenSSH
11-
(from https://phoenixnap.com/kb/generate-ssh-key-windows-10)
12-
Settings -> Apps -> Apps & Features -> Optional Features (or just press Windows and type Optional Features)
13-
Check to make sure OpenSSH Client is there. Otherwise click "Add a feature" and add it
14-
15-
(from https://dev.to/aka_anoop/how-to-enable-openssh-agent-to-access-your-github-repositories-on-windows-powershell-1ab8)
16-
Press the Windows key or open the Start menu and search for "Services"
17-
Double-click on "OpenSSH Authentication Agent"
18-
Change Startup type to `Automatic`
19-
Click **Start** under Service Status
11+
1. Click the **Start** menu and navigate to Settings -> Apps -> Apps & Features -> Optional Features (or just press the Windows key and search for "Optional Features")
12+
2. In the "Optional Features" window, check to make sure OpenSSH Client is in the list. Otherwise click **Add a feature** and add it.
13+
3. Press the Windows key or open the Start menu and search for "Services"
14+
4. In the "Services" window, double-click on "OpenSSH Authentication Agent"
15+
5. Change "Startup type" to `Automatic`
16+
6. Click the **Start** button under "Service Status"
2017

2118
## Step 2: Install Git
2219
1. Download [Git for Windows](https://git-scm.com) and run the installer.
2320
2. At the "Adjusting your PATH environment" step, select the "Git from the command line and also from 3rd-party software" option.
2421
3. At the "Choosing the SSH executable" step, select "Use external OpenSSH".
2522
4. Choose the rest of the options at your discretion.
2623
5. (Optional) [Install Posh Git and other helpers](https://git-scm.com/book/en/v2/Appendix-A%3A-Git-in-Other-Environments-Git-in-PowerShell).
27-
1. Right-click PowerShell and click "Run as Administrator"
28-
2. Run `Set-ExecutionPolicy -Scope LocalMachine -ExecutionPolicy RemoteSigned -Force`
29-
3. Close that window and open PowerShell normally.
30-
4. Run `Install-Module posh-git -Scope CurrentUser -Force`
31-
5. Run `Import-Module posh-git`
32-
6. Run `Add-PoshGitToProfile -AllHosts` to load posh-git automatically whenever PowerShell starts.
24+
1. Right-click PowerShell and click "Run as Administrator"
25+
2. Run `Set-ExecutionPolicy -Scope LocalMachine -ExecutionPolicy RemoteSigned -Force`
26+
3. Close that window and open PowerShell normally.
27+
4. Run `Install-Module posh-git -Scope CurrentUser -Force`
28+
5. Run `Import-Module posh-git`
29+
6. Run `Add-PoshGitToProfile -AllHosts` to load posh-git automatically whenever PowerShell starts.
3330

3431
## Step 3: Generate the SSH Key and add it to GitHub
3532
1. Open PowerShell
3633
2. Run `ssh-keygen -t ed25519 -C "[email protected]"` and follow the prompts.
3734
3. Run `ssh-add.exe ~\.ssh\id_ed25519` to add the key to your ssh-agent.
3835
4. Run `Get-Content ~\.ssh\id_ed25519.pub | clip`. This will copy the public key to your clipboard.
39-
5. [Add a new SSH key in GitHub](https://github.com/settings/ssh/new) and paste the public key into the "Key" field
36+
5. [Add a new SSH key in GitHub](https://github.com/settings/ssh/new) and paste the public key into the "Key" field
37+
38+
## References
39+
1. https://phoenixnap.com/kb/generate-ssh-key-windows-10
40+
2. https://dev.to/aka_anoop/how-to-enable-openssh-agent-to-access-your-github-repositories-on-windows-powershell-1ab8

0 commit comments

Comments
 (0)