# action-tmate **Repository Path**: mirrors_mozilla/action-tmate ## Basic Information - **Project Name**: action-tmate - **Description**: Debug your GitHub Actions via SSH by using tmate to get access to the runner system itself. - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-04-15 - **Last Updated**: 2026-02-14 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Debug your [GitHub Actions](https://github.com/features/actions) by using [tmate](https://tmate.io) [![GitHub Actions](https://github.com/mxschmitt/action-tmate/workflows/Node.js%20CI/badge.svg)](https://github.com/mxschmitt/action-tmate/actions) [![GitHub Marketplace](https://img.shields.io/badge/GitHub-Marketplace-green)](https://github.com/marketplace/actions/debugging-with-tmate) This GitHub Action offers you a direct way to interact with the host system on which the actual scripts (Actions) will run. ## Features - Debug your GitHub Actions by using SSH or Web shell - Continue your Workflows afterwards ## Supported Operating Systems - Linux - macOS - Windows ## Getting Started By using this minimal example a [tmate](https://tmate.io) session will be created. ```yaml name: CI on: [push] jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Setup tmate session uses: mxschmitt/action-tmate@v3 ``` To get the connection string, just open the `Checks` tab in your Pull Request and scroll to the bottom. There you can connect either directly per SSH or via a web based terminal. ![GitHub Checks tab](./docs/checks-tab.png "GitHub Checks tab") ## Without sudo By default we run the commands using sudo. If you get `sudo: not found` you can use the parameter below to execute the commands directly. ```yaml name: CI on: [push] jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Setup tmate session uses: mxschmitt/action-tmate@v3 with: sudo: false ``` ## Timeout By default the tmate session will remain open until the workflow times out. You can [specify your own timeout](https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstepstimeout-minutes) in minutes if you wish to reduce GitHub Actions usage. ```yaml name: CI on: [push] jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Setup tmate session uses: mxschmitt/action-tmate@v3 timeout-minutes: 15 ``` ## Only on failure By default a failed step will cause all following steps to be skipped. You can specify that the tmate session only starts if a previous step [failed](https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#failure). ```yaml name: CI on: [push] jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Setup tmate session if: ${{ failure() }} uses: mxschmitt/action-tmate@v3 ``` ## Use registered public SSH key(s) By default anybody can connect to the tmate session. You can opt-in to install the public SSH keys [that you have registered with your GitHub profile](https://docs.github.com/en/github/.authenticating-to-github/adding-a-new-ssh-key-to-your-github-account). ```yaml name: CI on: [push] jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Setup tmate session uses: mxschmitt/action-tmate@v3 with: limit-access-to-actor: true ``` If the registered public SSH key is not your default private SSH key, you will need to specify the path manually, like so: `ssh -i `. ## Continue a workflow If you want to continue a workflow and you are inside a tmate session, just create a empty file with the name `continue` either in the root directory or in the project directory by running `touch continue` or `sudo touch /continue`. ## Connection string / URL is not visible The connection string will be written in the logs every 5 seconds. For more information checkout issue [#1](https://github.com/mxschmitt/action-tmate/issues/1).