-
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
1 parent
ea07ecb
commit 8e90082
Showing
1 changed file
with
38 additions
and
0 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 |
---|---|---|
|
@@ -39,3 +39,41 @@ Display recent Git Changes | |
git --no-pager log --pretty=format:'\"%h\", \"%an\", \"%ci\", \"%s\", \"%b\"' --after "2023-11-30" | ||
``` | ||
|
||
|
||
|
||
# Setup SSH Key | ||
Generate a key pair | ||
``` | ||
ssh-keygen -t ed25519 -C "[email protected]" | ||
``` | ||
|
||
Start the ssh-agent in the background (as admin) | ||
``` | ||
Get-Service -Name ssh-agent | Set-Service -StartupType Manual | ||
Start-Service ssh-agent | ||
``` | ||
|
||
Add the SSH key to the ssh-agent (as non-admin) | ||
``` | ||
sh-add c:/Users/YOU/.ssh/id_ed25519 | ||
``` | ||
|
||
Add the SSH key to the Github account | ||
- Name > Settings > SSH and GPG Keys | ||
- New SSH Key | ||
- Copy contents of publickey.pub | ||
- Paste into text block and provide a name | ||
|
||
Attempt a Clone | ||
- At the main repo page, click <> Code | ||
- Go to Local > SSH tab | ||
- Copy the Git address for SSH and use it to clone via VSCode | ||
|
||
|
||
# Migrate a Repo | ||
``` | ||
git remote add remoterepo https://[email protected]/yourLogin/yourRepoName.git | ||
git push --mirror remoterepo | ||
``` | ||
|
||
Then go in and set the default branch and remove the old default as needed. |