"Bad Credentials" when trying to connect GH repo
ser-ban
HOBBYOP

an hour ago

I had some issues with my backend -- a few weeks ago i made a new org and moved my repo there, then moved it back to my original org. Today i found out that it said repository not found even though I moved it back to the original org where it was set to in Railway. I tried uninstalling and reinstalling the GH app from the org, and hard refreshing the page, and even though it did show the repo in the options, when I clicked it it still said 'Repository not found'.

After multiple reinstalls and hard refreshes I now het Bad Credentials. Again, reinstalled, hard refreshed, deleted cookies, took down Brave shields, nothing works. I am stuck with 'Bad Credentials' and unable to connect the Repo to the railway service.

$10 Bounty

1 Replies

Railway
BOT

an hour ago

This thread has been opened as a bounty so the community can help solve it.

Status changed to Open Railway about 1 hour ago


Anonymous
FREE

an hour ago

This usually happens because Railway is still holding a stale GitHub App installation token from when the repository was moved between organizations.

Try this in order:

  1. Go to the GitHub organization that currently owns the repository.
  2. Open Settings → GitHub Apps → Railway → Configure.
  3. Confirm Railway has access to the exact repository and that there are no pending permission requests.
  4. In Railway, open the service and disconnect the current GitHub repository under Settings → Source.
  5. Create a new temporary service and try connecting the same repository.

If the repository works on the temporary service, the old Railway service has a stale source connection. Delete the old source binding and reconnect it.

If every service still shows Bad Credentials, the issue is likely on Railway’s side. The GitHub App installation ID may not have updated after the repository transfer.

As a temporary workaround, deploy directly from your local machine:

railway login
railway link
railway up

This bypasses the GitHub connection and deploys the local project directly.


Welcome!

Sign in to your Railway account to join the conversation.

Loading...