Lightning-AI / Lightning-AI/lightning-thunder

[TE] CI Test fails with authentication error when the PR is created from a fork.

Open
#2,343 2 comments 0 reactions 2 assignees View on GitHub

@Borda is already working on this.

Since Jul 21, 2025.

ci TransformerEngine
Dominant language
Python
Stars
1.5k
Forks
121
PR merge metrics
No merged PRs in 30d

Description

```python
File "/opt/hostedtoolcache/Python/3.10.18/x64/lib/python3.10/site-packages/lightning_sdk/lightning_cloud/rest_client.py", line 193, in __init__
super().__init__(api_client=create_swagger_client(with_auth=with_auth))
File "/opt/hostedtoolcache/Python/3.10.18/x64/lib/python3.10/site-packages/lightning_sdk/lightning_cloud/rest_client.py", line 73, in create_swagger_client
api_client.default_headers["Authorization"] = Auth().authenticate()
File "/opt/hostedtoolcache/Python/3.10.18/x64/lib/python3.10/site-packages/lightning_sdk/lightning_cloud/login.py", line 131, in authenticate
self._run_server()
File "/opt/hostedtoolcache/Python/3.10.18/x64/lib/python3.10/site-packages/lightning_sdk/lightning_cloud/login.py", line 115, in _run_server
AuthServer().login_with_browser(self)
File "/opt/hostedtoolcache/Python/3.10.18/x64/lib/python3.10/site-packages/lightning_sdk/lightning_cloud/login.py", line 174, in login_with_browser
raise RuntimeError("Failed to authenticate to Lightning. When running without access to a browser, 'LIGHTNING_USER_ID' and 'LIGHTNING_API_KEY' should be exported.")
RuntimeError: Failed to authenticate to Lightning. When running without access to a browser, 'LIGHTNING_USER_ID' and 'LIGHTNING_API_KEY' should be exported.
```

This only happens when a PR is created from a different fork.

cc @borda

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.