github / vscode-github-actions

GitHub Actions extension for VS Code
https://marketplace.visualstudio.com/items?itemName=GitHub.vscode-github-actions
MIT License
495 stars 91 forks source link

Cannot log in to GitHub actions #251

Open Zingo21 opened 1 year ago

Zingo21 commented 1 year ago

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:

  1. Open Github Actions extension
  2. Click on log in
  3. Afterwards it will show up in the extension that it was Unable to connect to the GitHub API, please check your internet connection.
  4. (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 Skärmavbild 2023-08-21 kl  16 27 05

From the extension Skärmavbild 2023-08-21 kl  16 26 48

Extension Version v0.26.1

sebastianbuechler commented 1 year ago

Same here:

Cannot fetch github context
Error: Cannot fetch github context

Version: v0.26.1

Zingo21 commented 1 year ago

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.

monument-bmann commented 1 year ago

I see this issue when VSCode has a workspace open.

If I open an individual project I have no issue.

Version v0.26.1

# from Window output when clicking refresh
2023-08-23 12:39:14.055 [error] command 'github-actions.explorer.refresh' not found: Error: command 'github-actions.explorer.refresh' not found
    at b.k (vscode-file://vscode-app/.../AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:1669:3069)
    at b.executeCommand (vscode-file://vscode-app/.../AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:1669:2985)
    at async i.open (vscode-file://vscode-app/.../AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:616:40250)
    at async d.open (vscode-file://vscode-app/.../AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:616:41761)

# from Github Actions output
Activating GitHub Actions extension...
Error getting GitHub context
Not Found
HttpError: Not Found
    at /home/{user}/.vscode-server/extensions/github.vscode-github-actions-0.26.1/dist/extension-node.js:2:1366275
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async /home/{user}/.vscode-server/extensions/github.vscode-github-actions-0.26.1/dist/extension-node.js:2:1444089
    at async Promise.all (index 3)
    at async /home/{user}/.vscode-server/extensions/github.vscode-github-actions-0.26.1/dist/extension-node.js:2:1444005
    at async /home/{user}/.vscode-server/extensions/github.vscode-github-actions-0.26.1/dist/extension-node.js:2:1443637
    at async vt (/home/{user}/.vscode-server/extensions/github.vscode-github-actions-0.26.1/dist/extension-node.js:2:1443574)
    at async Os (/home/{user}/.vscode-server/extensions/github.vscode-github-actions-0.26.1/dist/extension-node.js:2:1624463)
    at async w.n (/home/{user}/.vscode-server/bin/1ad8d514439d5077d2b0b7ee64d2ce82a9308e5a/out/vs/workbench/api/node/extensionHostProcess.js:92:7006)
    at async w.m (/home/{user}/.vscode-server/bin/1ad8d514439d5077d2b0b7ee64d2ce82a9308e5a/out/vs/workbench/api/node/extensionHostProcess.js:92:6969)
    at async w.l (/home/{user}/.vscode-server/bin/1ad8d514439d5077d2b0b7ee64d2ce82a9308e5a/out/vs/workbench/api/node/extensionHostProcess.js:92:6426)

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.

Zingo21 commented 1 year ago

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.

NSimpragaVolur commented 1 year ago

Same issue with me. The GitHub Actions Output tab:

Activating GitHub Actions extension...
Error getting GitHub context
Not Found
HttpError: Not Found
    at c:\Users\<user>\.vscode\extensions\github.vscode-github-actions-0.26.1\dist\extension-node.js:2:1366275
    at process.processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async c:\Users\<user>\.vscode\extensions\github.vscode-github-actions-0.26.1\dist\extension-node.js:2:1444089
    at async Promise.all (index 0)
    at async c:\Users\<user>\.vscode\extensions\github.vscode-github-actions-0.26.1\dist\extension-node.js:2:1444005
    at async c:\Users\<user>\.vscode\extensions\github.vscode-github-actions-0.26.1\dist\extension-node.js:2:1443637
    at async vt (c:\Users\<user>\.vscode\extensions\github.vscode-github-actions-0.26.1\dist\extension-node.js:2:1443574)
    at async Os (c:\Users\<user>\.vscode\extensions\github.vscode-github-actions-0.26.1\dist\extension-node.js:2:1624463)
    at async p.n (c:\Users\<user>\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:102:6206)
    at async p.m (c:\Users\<user>\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:102:6169)
    at async p.l (c:\Users\<user>\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:102:5626)

Few things worth mentioning:

  1. The extension works for repositories in other organizations
  2. The organization where the extension does not work has SAML SSO enabled

For that org, the Output tab for GitHub (not GitHub Actions) says:

Failed to update repository branch protection: Request failed due to following response errors:
 - Resource protected by organization SAML enforcement. You must grant your OAuth token access to this organization.
incomingstick commented 1 year ago

I seem to receive a similar, but not identical error in my GitHub Actions extension output:

Error getting GitHub context
fetch failed
HttpError: fetch failed
    at c:\Users\<user>\.vscode\extensions\github.vscode-github-actions-0.26.2\dist\extension-node.js:2:1366802
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async c:\Users\<user>\.vscode\extensions\github.vscode-github-actions-0.26.2\dist\extension-node.js:2:1447997
    at async Object.get (c:\Users\<user>\.vscode\extensions\github.vscode-github-actions-0.26.2\dist\extension-node.js:2:1447724)
    at async Lt (c:\Users\<user>\.vscode\extensions\github.vscode-github-actions-0.26.2\dist\extension-node.js:2:1447916)
    at async c:\Users\<user>\.vscode\extensions\github.vscode-github-actions-0.26.2\dist\extension-node.js:2:1626346
    at async n.h (c:\Users\<user>\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:125:84275)

Cannot fetch github context
Error: Cannot fetch github context
    at vt (c:\Users\<user>\.vscode\extensions\github.vscode-github-actions-0.26.2\dist\extension-node.js:2:1444927)
    at async c:\Users\<user>\.vscode\extensions\github.vscode-github-actions-0.26.2\dist\extension-node.js:2:1626446
    at async n.h (c:\Users\<user>\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:125:84275)

Meanwhile my GitHub extension output is:

2023-10-13 10:29:49.462 [info] Log level: Info
2023-10-13 10:29:52.627 [warning] Failed to update repository branch protection: No GitHub authentication session available.
2023-10-13 10:29:59.528 [warning] Failed to update repository branch protection: No GitHub authentication session available.
2023-10-13 10:30:28.560 [warning] Failed to update repository branch protection: No GitHub authentication session available.

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:

2023-10-13 10:40:48.493 [info] Getting sessions for repo,workflow...
2023-10-13 10:40:48.493 [info] Got 1 sessions for repo,workflow...
sgordon46 commented 1 year ago

I'm receiving a similar experience and similar output in the logs.

2023-10-26 11:33:46.034 [info] Getting sessions for repo,workflow...
2023-10-26 11:33:46.034 [info] Got 1 sessions for repo,workflow...
Error: Cannot fetch github context
    at vt (/Users/<user>/.vscode/extensions/github.vscode-github-actions-0.26.2/dist/extension-node.js:2:1444927)
    at async /Users/<user>/.vscode/extensions/github.vscode-github-actions-0.26.2/dist/extension-node.js:2:1626446
    at async n.h (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:125:84275)

These are the messages I receive when my corporate VPN is running, but if I disable the VPN all is working fine.

Access to github.com is working fine, along with my other vscode GitHub integrations, both with VPN and without.

ArminPrieschl commented 1 year ago

Same issue here with Github Enterprise and SAML Auth.

Cannot fetch github context
Error: Cannot fetch github context
    at vt (c:\Users\user\.vscode\extensions\github.vscode-github-actions-0.26.2\dist\extension-node.js:2:1444927)
    at Bt (c:\Users\user\.vscode\extensions\github.vscode-github-actions-0.26.2\dist\extension-node.js:2:1445257)
    at Os (c:\Users\user\.vscode\extensions\github.vscode-github-actions-0.26.2\dist\extension-node.js:2:1637593)
    at v.n (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:125:6205)
    at v.m (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:125:6168)
    at v.l (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:125:5625)
...initialized
moongoal commented 1 year ago

Experiencing the same issue on Windows, extension v0.26.2, vscode latest, no VPN, no enterprise.

bng5 commented 11 months ago

Probably not the same issue. In my case, clicking "Sign in to GitHub" prints this error in the Developer Tools console:

  ERR command 'github-actions.sign-in' not found: Error: command 'github-actions.sign-in' not found
    at y.n (vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:1537:12331)
    at y.executeCommand (vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:1537:12260)
    at async i.open (vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:645:41218)
    at async u.open (vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:645:42600)
TomokiOshiman commented 11 months ago

Same here

Cannot fetch github context
Error: Cannot fetch github context
    at vt (/Users/user/.vscode/extensions/github.vscode-github-actions-0.26.2/dist/extension-node.js:2:1444927)
    at /Users/user/.vscode/extensions/github.vscode-github-actions-0.26.2/dist/extension-node.js:2:1626446
    at d.h (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:141:140086)
renatho commented 10 months ago

Same here on M1, extension v0.26.2.

Already tried opening a repository folder or opening VS code without any project selected. Both presented the same issues.

The first output is:

Activating GitHub Actions extension...
Error getting GitHub context
Bad credentials
HttpError: Bad credentials

And every time I click on "Refresh" for the extension, I receive the following output:

Cannot fetch github context
alexgshaw commented 10 months ago

I also have this same issue:

Activating GitHub Actions extension...
Error getting GitHub context
Bad credentials
HttpError: Bad credentials
    at /Users/alexshaw/.vscode/extensions/github.vscode-github-actions-0.26.2/dist/extension-node.js:2:1366400
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at /Users/alexshaw/.vscode/extensions/github.vscode-github-actions-0.26.2/dist/extension-node.js:2:1447997
    at Object.get (/Users/alexshaw/.vscode/extensions/github.vscode-github-actions-0.26.2/dist/extension-node.js:2:1447724)
    at Lt (/Users/alexshaw/.vscode/extensions/github.vscode-github-actions-0.26.2/dist/extension-node.js:2:1447916)
    at Os (/Users/alexshaw/.vscode/extensions/github.vscode-github-actions-0.26.2/dist/extension-node.js:2:1624572)
    at u.n (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:140:6255)
    at u.m (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:140:6218)
    at u.l (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:140:5675)

Cannot fetch github context
Error: Cannot fetch github context
    at vt (/Users/alexshaw/.vscode/extensions/github.vscode-github-actions-0.26.2/dist/extension-node.js:2:1444927)
    at Os (/Users/alexshaw/.vscode/extensions/github.vscode-github-actions-0.26.2/dist/extension-node.js:2:1624588)
    at u.n (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:140:6255)
    at u.m (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:140:6218)
    at u.l (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:140:5675)

I have a Macbook with an Intel chip. Other GitHub extensions work fine, e.g. GitHub Copilot

saqib-ahmed commented 9 months ago

Same issue for me on Macbook Pro intel with Sonoma Version 14.2.1 (23C71).

Activating GitHub Actions extension...
Error getting GitHub context
Not Found
HttpError: Not Found
    at /Users/xyz/.vscode/extensions/github.vscode-github-actions-0.26.2/dist/extension-node.js:2:1366400
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async /Users/xyz/.vscode/extensions/github.vscode-github-actions-0.26.2/dist/extension-node.js:2:1444214
    at async Promise.all (index 0)
    at async /Users/xyz/.vscode/extensions/github.vscode-github-actions-0.26.2/dist/extension-node.js:2:1444130
    at async /Users/xyz/.vscode/extensions/github.vscode-github-actions-0.26.2/dist/extension-node.js:2:1443762
    at async vt (/Users/xyz/.vscode/extensions/github.vscode-github-actions-0.26.2/dist/extension-node.js:2:1443699)
    at async Os (/Users/xyz/.vscode/extensions/github.vscode-github-actions-0.26.2/dist/extension-node.js:2:1624588)
    at async u.n (/Users/xyz/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:140:6255)
    at async u.m (/Users/xyz/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:140:6218)
    at async u.l (/Users/xyz/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:140:5675)
gzimbron commented 9 months ago

Same issue.

Macbook Pro M1 Pro, actually I have Github copilot working on my vscode, but error in Github Actions extension

Cannot fetch github context
Error: Cannot fetch github context
    at vt (/Users/gzimbron/.vscode/extensions/github.vscode-github-actions-0.26.2/dist/extension-node.js:2:1444927)
    at /Users/gzimbron/.vscode/extensions/github.vscode-github-actions-0.26.2/dist/extension-node.js:2:1626446
    at s.h (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:150:175235)
    at /Users/gzimbron/.vscode/extensions/github.vscode-github-actions-0.26.2/dist/extension-node.js:2:1625230
bengingrich-oc commented 9 months ago

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

bryant-finney commented 9 months ago

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 (version 23H2). 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:

Error: Cannot fetch github context
    at vt (/home/bryantfinney/.vscode-server-insiders/extensions/github.vscode-github-actions-0.26.2/dist/extension-node.js:2:1444927)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at /home/bryantfinney/.vscode-server-insiders/extensions/github.vscode-github-actions-0.26.2/dist/extension-node.js:2:1626446
    at s.h (/home/bryantfinney/.vscode-server-insiders/bin/8fa84589eef3538dbc763ff98dc7d5a8a0c56374/out/vs/workbench/api/node/extensionHostProcess.js:150:178999
yamachu commented 9 months ago

I had same issue. But after upgrading to 1.87.0-insider commit: 01f46bb5357baa8f3b9da690e1e34eb78e09a72b, it no longer reproduces.

ghost commented 8 months ago

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 had the same issue, MAC CA VSCODE installation resolved my problem.

scottco-slalom commented 8 months ago

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

This is what finally solved the issue for me. Thank you so much for sharing the extension. Literally all I did was install Mac CA VSCode and restart, and the GitHub Actions extension starting working as epected for the first time in ages!

mysticflute commented 8 months ago

Experiencing this issue as well on a Mac. Tried uninstalling and reinstalling but it didn't work. The other GitHub extensions are working fine, so it seems specific to this one.

doudar commented 8 months ago

Same issue here. The win-ca extension didn't help me.

AaronMT commented 8 months ago

Mac CA VSCode did nothing for me either.

Error getting GitHub context
Bad credentials
HttpError: Bad credentials
    at /Users/aaronmt/.vscode/extensions/github.vscode-github-actions-0.26.2/dist/extension-node.js:2:1366400
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async /Users/aaronmt/.vscode/extensions/github.vscode-github-actions-0.26.2/dist/extension-node.js:2:1447997
    at async Object.get (/Users/aaronmt/.vscode/extensions/github.vscode-github-actions-0.26.2/dist/extension-node.js:2:1447724)
    at async Lt (/Users/aaronmt/.vscode/extensions/github.vscode-github-actions-0.26.2/dist/extension-node.js:2:1447916)
    at async Os (/Users/aaronmt/.vscode/extensions/github.vscode-github-actions-0.26.2/dist/extension-node.js:2:1624572)
    at async u.n (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:140:6255)
    at async u.m (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:140:6218)
    at async u.l (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:140:5675)

and then on every attempt to refresh

Cannot fetch github context
Error: Cannot fetch github context
    at vt (/Users/aaronmt/.vscode/extensions/github.vscode-github-actions-0.26.2/dist/extension-node.js:2:1444927)
    at /Users/aaronmt/.vscode/extensions/github.vscode-github-actions-0.26.2/dist/extension-node.js:2:1626446
    at l.h (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:150:184831)
KamasamaK commented 7 months ago

Using VS Code 1.87.2 on Windows 10

Cannot fetch github context
Error: Cannot fetch github context
    at vt (c:\Users\kama\.vscode\extensions\github.vscode-github-actions-0.26.2\dist\extension-node.js:2:1444927)
    at async c:\Users\kama\.vscode\extensions\github.vscode-github-actions-0.26.2\dist\extension-node.js:2:1626446
    at async l.h (c:\Users\kama\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:150:184831)
Error getting GitHub context
Bad credentials
HttpError: Bad credentials
    at c:\Users\kama\.vscode\extensions\github.vscode-github-actions-0.26.2\dist\extension-node.js:2:1366400
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async c:\Users\kama\.vscode\extensions\github.vscode-github-actions-0.26.2\dist\extension-node.js:2:1447997
    at async Object.get (c:\Users\kama\.vscode\extensions\github.vscode-github-actions-0.26.2\dist\extension-node.js:2:1447724)
    at async Lt (c:\Users\kama\.vscode\extensions\github.vscode-github-actions-0.26.2\dist\extension-node.js:2:1447916)
    at async hs.refresh (c:\Users\kama\.vscode\extensions\github.vscode-github-actions-0.26.2\dist\extension-node.js:2:1614307)
    at async c:\Users\kama\.vscode\extensions\github.vscode-github-actions-0.26.2\dist\extension-node.js:2:1626804
    at async l.h (c:\Users\kama\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:150:184831)

I can confirm that the GitHub credentials are good as the "GitHub Pull Requests" extension works fine with the same GitHub Authentication account.

EagleIJoe commented 7 months ago

After a vscode restart this morning. the extension asked me to reauth because SAML enforcement is enabled, and that did the trick. I did enable Experimental System Certificates v2 yesterday. Maybe that was the missing link.

MetRonnie commented 7 months ago

Enabling Experimental System Certificates v2 (in settings) did not fix it for me. This is still the only GitHub extension that doesn't auth for me

dacudo commented 6 months ago

I am experiencing this issue too. The Mac CA VSCode extension didn't work.

cortexcompiler commented 6 months ago

I think this may be a duplicate of: https://github.com/github/vscode-github-actions/issues/39. At least, I know my issue is that it is not using the certificates in the keystore and therefore getting blocked by a corporate proxy.

The Mac CA VSCode seems to help with the sidebar, but the GItHub Actions Language Server is still having problems, causing false findings for resolving action references.

mechaniccoder commented 5 months ago

I resolve this issue by steps below.

  1. Sign out from github by right click account menu in vscode (left bottom in sidebar) Screenshot 2024-05-25 at 8 54 32 PM

  2. Reauthenticate github by clicking button in github actions extension

RobTranquillo commented 5 months ago

thanks mechaniccoder. Logging out of all my accounts solved the problem for me! I was logged in 3 times, a corporate account (with Enterprise Copilot), a personal account (with paid Copilot chat which was automatically disabled by Enterprise Copilot) and another personal account (same email as in github but logged in a Microsoft Acoount) which was also logged into Github. After logging out, I first logged in to Github Actions and then to Github Copilot. Only then did it work.

grafik

pratheesh-prakash commented 4 months ago

I resolve this issue by steps below.

1. Sign out from github by right click account menu in vscode (left bottom in sidebar)
   ![Screenshot 2024-05-25 at 8 54 32 PM](https://private-user-images.githubusercontent.com/58871413/333797715-2e6d24ce-77a3-4860-9071-de4b25124d35.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTg3ODA5MDUsIm5iZiI6MTcxODc4MDYwNSwicGF0aCI6Ii81ODg3MTQxMy8zMzM3OTc3MTUtMmU2ZDI0Y2UtNzdhMy00ODYwLTkwNzEtZGU0YjI1MTI0ZDM1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MTklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjE5VDA3MDMyNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTcwNzE3Y2ZjZjZiZGY4ZGU0OTFmODBkNWNiZjU0NTgwNmQwYjJmYTI3OGQ5OGYwOTg1Y2E4YTNjNmYyYjkyNWImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.7tcwVDB81rgNUBIyHX816P3Y4kzQ2OHu9CrhlUi2H6U)

2. Reauthenticate github by clicking button in github actions extension

This worked for me.

linyihai commented 3 months ago

I resolve this issue by steps below.

  1. Sign out from github by right click account menu in vscode (left bottom in sidebar) Screenshot 2024-05-25 at 8 54 32 PM
  2. Reauthenticate github by clicking button in github actions extension

This works for me. I recently changed my password, but the vscode inner github login state doesn't updated.

mfleyfel commented 1 month ago

Anyone still having this problem, this solved it for me in Windows after everything else here did nothing: "Launch VS Code, go to File > Preferences > Settings > Search for "certificates" and check the box for Http > Experimental: System Certificates V2 "x Controls whether experimental loading of CA certificates from the OS should be enabled."

https://stackoverflow.com/questions/36506539/how-do-i-get-visual-studio-code-to-trust-our-self-signed-proxy-certificate

fix

hejfelix commented 1 week ago

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

this worked for me on mac os with an SSO login. Thanks!!