12 days ago
Railway is unable to fetch repository files from my private GitHub repository, even after disconnecting and reconnecting the GitHub integration, uninstalling/reinstalling the Railway GitHub App, and authorizing access again.
Errors shown in Railway:
Bad credentials
Failed to fetch repository files
There was an error deploying from source
3 Replies
Status changed to Open Railway • 12 days ago
Status changed to Solved bnsant • 12 days ago
12 days ago
it's not solved i missclicked
Status changed to Awaiting Railway Response Railway • 12 days ago
11 days ago
This is most likely still a GitHub App installation or source-binding problem, even if you already disconnected and reconnected once.
The key errors are:
Bad credentials
Failed to fetch repository files
There was an error deploying from source
That means Railway is failing before it can read the repo contents. I would check it in this order:
- Open GitHub.
- Go to Settings -> Applications -> Installed GitHub Apps.
- Open the Railway app installation.
- If it is set to selected repositories, make sure this exact private repo is selected.
- Save the GitHub App installation.
If the repo is under a GitHub organization, also check org SSO or third-party app restrictions. Some orgs let you install the app but still block access until SSO is approved for that app.
Then reconnect the Railway source from the service, not only from account settings:
Railway service -> Settings -> Source -> disconnect GitHub source
Railway service -> Settings -> Source -> connect GitHub source again
Select the private repo and branch again
Trigger a fresh deploy
Also verify the repo has not been renamed, transferred to another owner, archived, or made inaccessible to the GitHub user that installed the Railway app. Railway access is tied to the GitHub App installation and repository permission, not just to whether your Railway account is logged in.
One quick isolate test is to create a temporary new Railway service and try to deploy from the same private repo:
If the new service also cannot fetch files, the GitHub App installation or org access is still wrong.
If the new service can fetch files, the original Railway service likely has a stale source binding, and reconnecting the service source should fix it.
I would not spend time changing build commands, environment variables, or Docker/Nixpacks settings yet. The failure is happening at source fetch time, before Railway reaches the build step.
11 days ago
Hi there! GitHub is currently experiencing an issue with app installation token authentication which is causing these errors. You can track it here: https://www.githubstatus.com/incidents/k5z4d1v1tqmt. No action needed on your end, deploys should recover once GitHub resolves this. Apologies for the trouble!
Status changed to Awaiting User Response Railway • 11 days ago
4 days ago
This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!
Status changed to Solved Railway • 4 days ago