* fix(github): fall back to a writable connected server's stored credential when no local server exists
Repository preparation borrowed a server's stored GitHub credential only
from the organization's canonical local server. Self-hosted setups whose
deploy target is a connected SSH server with its own stored PAT could
deploy but not scan the same private repo: with no server selected, the
fallback found no local server and preparation failed with
GITHUB_TOKEN_REQUIRED.
When no server is selected and the organization has no local server, use
the oldest connected deployment server the caller has write access to
that holds a stored token credential, the same set a real deploy can use.
Repository access, same-organization, server write permission, and
read-only local-read limits are unchanged. Explicit server selection is
unchanged.
Fixes#1630
* fix(github): require server selection for ambiguous repository credentials
* fix(dashboard): keep repository recovery server selection manual
---------
Co-authored-by: Hydra <abdelhamedmo59@gmail.com>
A GitHub 5xx, rate limit, timeout or connection error while minting an App
installation token was swallowed by tryInstallationToken and reported as "no
credential". The chain then either fell through to a broader user credential
or ended in GITHUB_TOKEN_REQUIRED (403). The Actions runner reconciler treats
that 403 as a definitive loss of access and cancels the running job, so a
single transient GitHub error killed self-hosted runner jobs mid-run.
Transient mint failures are now rethrown. Definitive failures (suspended or
revoked installations) keep falling through as before.