action-tmate: Unable to see tmate.io link/connection string
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.
YML
I have a simple YML action workflow to try this action out
name: CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Setup tmate session
uses: mxschmitt/action-tmate@v1
Screenshots
I have looked on the PR itself and can not find it and the streaming logs is not listing anything out for me to see the URL, only when I cancel/stop the run can I see the log output and what the tmate.io URL was.


About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 25 (9 by maintainers)
Commits related to this issue
- added a sleep step as suggested in https://github.com/mxschmitt/action-tmate/issues/1#issuecomment-601459524 — committed to SeasideSt/Grease by jbrichau 3 years ago
@andymckay I think this whole Action should just basically be part of Github Actions itself. The ability is to live debug a worker is invaluable.
šš½ Hi there from GitHub. Sorry that you are getting this issue.
It sounds like thereās a possible intermittent race condition going on here. The log is being written before the connection is being opened to the view the logs. If that happens the log isnāt going to be written back to the GitHub UI. Iāll talk to the engineering team and see what we can find out.
Hey all!
Iāve integrated a workaround which will write the connection information every 5 seconds to the stdout. With this change it should be fixed or at least there is now a way to obtain the SSH server information etc. Please let me know if this helps. Thank you and stay healthy!
This action is quite handy but what do you think of the idea to make the 5 seconds be a controllable value? Personally, I would like to see it print the info and then wait something like 15 or 30 seconds before printing the connection info again. The problem I have is that I try to select the relevant text in the output window and then do right-mouse click to ācopyā but 5 seconds have elapsed causing the copy region to get shifted. I probably would also be interested in an option to only display ssh connection info.
Iāve seen the same issue. Workaround is as described above to be in Github Actions UI before the step is executed.
Workaround
ā ļø Open this view before the step
Setup tmate sessionis executed.Bad news, unfortunately its unlikely weāll have a fix for this relatively soon, thereās quite a bit of architecture weāll need to change around on our side. Weāll get there - but I canāt give you a clear timeline of when that might be.
The best solutions right now are all slightly hacky Iām afraid. Is it possible to tell if the ssh connection has been made and if not, then after say 5 seconds print the information out again? This would push the log through the connection to the UI and ensure the user gets the endpoint to connect to.
It is about time that this will be a thing of the past with Actions streaming logs with backscroll.
This doesnāt seem to be a fix, but Iāve found that adding a basic sleep step before the tmate session is set up helps, e.g.:
Without that the live logging never appears for me even if Iām monitoring the job from the UI.
In my perspective the described issue is also present, when e.g. a 5 minute long build job will be triggered via a GitHub Action. Then itās also sometimes not possible to see the live output by clicking on the Action itself in the GitHub Actions Console.
But seems unfortunately a GitHub related issue. Iāve changed nothing since a fews days and more than writing to stdout I also canāt do š