vscode-github-actions: Cannot log in to GitHub actions
Describe the bug It is not possible to log in to Github actions. Even if I try to with the refresh button, it won’t work.
To Reproduce Steps to reproduce the behavior:
- Open Github Actions extension
- Click on log in
- Afterwards it will show up in the extension that it was
Unable to connect to the GitHub API, please check your internet connection.
- (Optional) See error in the output log when you click on refresh button in the extension
Cannot fetch github context Error: Cannot fetch github context
Expected behavior I expected to be logged in to my GitHub account and se my actions in the repository I’m working on
Screenshots
From the output log
From the extension
Extension Version
v0.26.1
About this issue
- Original URL
- State: open
- Created 10 months ago
- Reactions: 14
- Comments: 27
Same issue here with Github Enterprise and SAML Auth.
Same issue with me. The GitHub Actions Output tab:
Few things worth mentioning:
For that org, the Output tab for GitHub (not GitHub Actions) says:
I have found a solve to this issue.
There is an extension in VS code called “win-ca” that is used to map local certifications into VS code including GitHub. This is for windows users only. For mac users, use “Mac CA VSCode”. I was able to set the config of that extension to append certs (defaults to replace) and it now allows me to fetch the GitHub API when cloning a repository and using the GitHub Actions extension in VS code.
My issue occurred only when I was on our companies VPN but works fine now with the extension I listed above.
Windows: https://marketplace.visualstudio.com/items?itemName=ukoloff.win-ca MAC: https://marketplace.visualstudio.com/items?itemName=linhmtran168.mac-ca-vscode
I see this issue when VSCode has a workspace open.
If I open an individual project I have no issue.
Update: After testing with my VSCode workspace. I discovered the issue occurs when there is a folder in the workspace that has been
git init
but has not had a git remote added.I also have this same issue:
I have a Macbook with an Intel chip. Other GitHub extensions work fine, e.g. GitHub Copilot
I seem to receive a similar, but not identical error in my GitHub Actions extension output:
Meanwhile my GitHub extension output is:
The GitHub Pull Requests and Issues extensions appears to work without issue. It is only GitHub Actions that fails, the same way as the initial issue. This is for an Enterprise org as well, however no GitHub Enterprise URI is required.
When I click the “Refresh” button in the GitHub Actions extension, I can see it use the GitHub Authentication extension to successfully get the session:
I had same issue. But after upgrading to
1.87.0-insider
commit:01f46bb5357baa8f3b9da690e1e34eb78e09a72b
, it no longer reproduces.I started experiencing this issue after I upgraded to
1.87.0-insider
(8fa84589
) a couple of days ago. It had been working just fine for months before the upgrade.The issue is present on both my M2 Mac (Sonoma
14.2.1
) and my Windows 11 Pro (version23H2
). As others describe, only the GitHub.vscode-github-actions extension is affected; I’m successfully using all of the following:I’m seeing the same traceback as others have shared:
23H2
(both on the host and on aWSL2
distro ofUbuntu 22.04
)14.2.1
)1.87.0-insider
8fa84589eef3538dbc763ff98dc7d5a8a0c56374
Probably not the same issue. In my case, clicking “Sign in to GitHub” prints this error in the Developer Tools console:
The git authentication config was not the problem. I thought that the problem lied there because I’ve had problems pushing GitHub action workflow files from VS Code. When I finally set up the git auth config, I could push commits that had the github actions workflow files, and then I thought that the git auth config might be the solution to the Github actions extension too. But it was not. I’m greeted with no context in the output and could not connect to the Github API.
It might be the git authenticaton configuration that might be the problem because I have also the problem to push workflow files in VS Code and in an external terminal.