Project Setup
Create and add ssh key¶
Create ssh-key using the ed25519 algorithm and saves it with a custom name
Add the ssh key to the ssh agent
List currently loaded keys in the SSH agent
Copy the public key
Add the SSH key to GitHub/GitLab:
- Go to your GitHub or GitLab account settings
- In GitHub, navigate to Settings > SSH and GPG keys. In GitLab, navigate to Preferences > SSH Keys
- Click New SSH Key and paste the copied public key
id_ed25519_github-account.pubinto the field - Give it a descriptive title (e.g., "My GitHub SSH Key") and save it
After doing this, your SSH key will be associated with your GitHub or GitLab account, and you'll be able to use it for authentication when pushing or pulling code from repositories.
Add your ssh key to GitHub/GitLab¶
Clone a repository using SSH¶
Once the SSH key is added to your GitHub/GitLab account, you can clone a repository using ssh:
Create a new repository on the command line¶
git init
git add README.md
git commit -m "first commit"
git branch -M main
git remote add origin git@github.com:icloudal/das.git
git push -u origin main
#Do not add a README if you want to push from local to GitHub. It needs to be empty