Difference between revisions of "HowTo SSH Keys"

From sigrok
Jump to navigation Jump to search
Line 23: Line 23:
# Click on "Settings" (repository settings)<br />[[File:source_settings.png]]
# Click on "Settings" (repository settings)<br />[[File:source_settings.png]]
# Click on "Secrets" and then on "Actions"<br />[[File:source_secrets.png]]
# Click on "Secrets" and then on "Actions"<br />[[File:source_secrets.png]]
# Click on "New repository secret"<br />[[File:source_add_key.png]]
# Click on "New repository secret"<br />[[File:source_add_secret.png]]
# Enter a name (Name is used in the Github workflow): <code>SSH_SYNCY_KEY</code>
# Enter a name (Name is used in the Github workflow): <code>SSH_SYNCY_KEY</code>
# Paste the content of the <b>private key</b> into the "value" text area<br />[[File:source_add_private_key.png]]
# Paste the content of the <b>private key</b> into the "value" text area<br />[[File:source_add_private_key.png]]

Revision as of 18:43, 2 April 2023

Generate and deploy SSH Keys to Github

Generate the keys

  1. Generate key
     $ ssh-keygen -t ed25519 -C "your_email@example.com"
    
  2. Name the file id_github_sigrokorg and store it somewhere in your home directory (e.g. /home/frank/.ssh)
  3. Don't enter a password
  4. You now have two files: id_github_sigrokorg (the private key) and id_github_sigrokorg.pub (the public key)

Add public key to the destination repository (e.g. libsigrokflow)

  1. Go the the Github page of the repository in question (e.g. https://github.com/sigrokproject/libsigrokflow)
  2. Click on "Settings" (repository settings)
    Destination settings.png
  3. Click on "Deploy keys"
    Destination deploy keys.png
  4. Click on "Add deploy key"
    Destination add key.png
  5. Enter a title, e.g. "Deploy key for sigrok-sync"
  6. Paste the content of the public key into the "key" text area
  7. Select "Allow write access"
    Destination add public key.png

Add private key to the source repository (sigrok-sync)

  1. Go the the Github page of the sigrok-sync repository
  2. Click on "Settings" (repository settings)
    Source settings.png
  3. Click on "Secrets" and then on "Actions"
    Source secrets.png
  4. Click on "New repository secret"
    Source add secret.png
  5. Enter a name (Name is used in the Github workflow): SSH_SYNCY_KEY
  6. Paste the content of the private key into the "value" text area
    Source add private key.png