Skip to content

debugging using GitHub runner vie tmate with secure way.

Notifications You must be signed in to change notification settings

jonjeexe/Tmate_debugging

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 

Repository files navigation

Tmate debugging

Generate and add an SSH key to GitHub using the command line. This setup is required to use limit-access-to-actor: true in your GitHub Actions tmate session.


  1. Install Necessary Tools.
sudo apt install openssh-client git -y

  1. Generate the SSH Key. Run the following command, replacing the email with your GitHub account email.
ssh-keygen -t ed25519 -C "your_email@example.com"
  • Enter file in which to save: Press Enter to use the default location.
  • Enter passphrase: Press Enter twice to skip, or provide a password for extra security.

  1. Copy the Public Key Display the content of your public key so you can copy it
cat ~/.ssh/id_ed25519.pub

Select the entire output text (starting with ssh-ed25519 and ending with your email) and Copy it.


  1. Add the Key to GitHub.
  • Open your browser and log in to your GitHub SSH Settings.
  • Click New SSH key.
  • Title: Enter a name like "Terminal-debugging".
  • Key: Paste the public key you copied from Terminal.
  • Click Add SSH key.

5. Test the Connection Verify that Terminal can successfully connect to GitHub via SSH
ssh -T git@github.com

If successful, you will see a message: "Hi [YourUsername]! You've successfully authenticated..."


  1. Connect to your GitHub Action Once the Action starts and provides an SSH string, use it directly in Terminal.
ssh <provided_tmate_string>

Because you added your key to GitHub and used limit-access-to-actor: true in your workflow, Terminal will now be the only device allowed to connect to that session

Tmate tweak to off green line

tmux set-option -g status off

About

debugging using GitHub runner vie tmate with secure way.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published