a month ago
Hi. I have a service in a project, production environment. I want to deploy it from my private repository, main branch. When I try to connect it, Railway responds “User does not have access to the repo” and the Source section shows “Could not load branches”. I already have my GitHub account connected and the repository exists. How do I give Railway access to this repository? Thanks.
13 Replies
a month ago
Can you make sure you have given the Railway App bot access to your repositories?
GitHub Settings -> Applications -> Railway App -> Configure -> Repository access
Then please go into your Railway account and unlink and relink the GitHub integration.
Status changed to Awaiting User Response Railway • 26 days ago
Railway
Can you make sure you have given the Railway App bot access to your repositories? GitHub Settings -> Applications -> Railway App -> Configure -> Repository access Then please go into your [Railway account](https://railway.com/account) and unlink and relink the GitHub integration.
a month ago
I am in GitHub, filled in this field in Create GitHub App. GitHub App name: Railway. Then it asks me for Homepage url. Should I write there "railway.com"?
Status changed to Awaiting Railway Response Railway • 26 days ago
a month ago
You don't need to create a new GitHub App, so you can cancel that form. Railway already has its own app, and you only need to grant it access to your private repository.
In your Railway account settings, find the GitHub panel under Account Integrations and select Edit Scope. That takes you to GitHub, where you can choose the private repository to give Railway access to. After saving, go back to your service's Source section and the branches should load.
Status changed to Awaiting User Response Railway • 26 days ago
a month ago
Inside Railway, should I go to the square with the name of the Repository I created, that has 4 logos inside: cube, GitHub, two postgres elephants?
Status changed to Awaiting Railway Response Railway • 26 days ago
a month ago
No, that card is your project, and the GitHub access setting isn't there. Open your account settings at railway.com/account, find the GitHub panel in the Account Integrations section, and select Edit Scope. That takes you to GitHub, where you choose your private repository and save.
If you don't see Edit Scope, GitHub isn't connected to your Railway account yet, so connect it from that same panel first. After saving, open your service again and go to its Source section to pick the repository and the main branch.
Status changed to Awaiting User Response Railway • 26 days ago
Railway
No, that card is your project, and the GitHub access setting isn't there. Open your account settings at [railway.com/account](https://railway.com/account), find the `GitHub` panel in the `Account Integrations` section, and select `Edit Scope`. That takes you to GitHub, where you choose your private repository and save. If you don't see `Edit Scope`, GitHub isn't connected to your Railway account yet, so connect it from that same panel first. After saving, open your service again and go to its Source section to pick the repository and the `main` branch.
a month ago
there is not Edit Scope there. What I have there is the option to clic "Connect" in a GitHub square. Gmail is connected. GitHub is not. shall I click there?
Status changed to Awaiting Railway Response Railway • 26 days ago
a month ago
Yes, click Connect on the GitHub panel. Your GitHub account isn't linked to your Railway account yet, and that's why Railway can't see the repository.
Once it's connected, the GitHub panel will show the Edit Scope option. Use it to select your private repository on GitHub and save. After that, open your service's Source section and choose the repository and the main branch.
Status changed to Awaiting User Response Railway • 26 days ago
a month ago
it is connected. The Edit Scope option you mention, I can't find it. It says Raiklway App installed. And the button "Configure" beside it. if I clic, it takes me to my app inside Railway.
Status changed to Awaiting Railway Response Railway • 26 days ago
a month ago
Since GitHub is now connected, the remaining step is to give the Railway App access to your private repository, and that setting is on GitHub rather than inside Railway. Open github.com/settings/installations while signed in to the GitHub account that owns the repository. Click Configure next to Railway App, then under Repository access either choose All repositories, or choose Only select repositories and add your repository. Click Save.
After that, go back to your service's Source section and select the repository and the main branch. If the repository belongs to a GitHub organization rather than your personal account, do the same from that organization's settings, under Third-party Access then GitHub Apps.
Status changed to Awaiting User Response Railway • 26 days ago
a month ago
After that, go back to your service's Source section and select the repository and the main branch. take me here. is it in GitHub?
Status changed to Awaiting Railway Response Railway • 26 days ago
a month ago
No, that step is inside Railway, not GitHub. Open your project, click on the service you want to deploy, go to its Settings tab, and find the Service Source setting. Select Connect Repo, choose your private repository, and set the branch to main.
If the repository still doesn't appear there, the Railway App in GitHub doesn't have access to it yet, and you can grant that from the Railway App installation page on GitHub.
Status changed to Awaiting User Response Railway • 26 days ago
a month ago
should I clic: connect environment to Brunch inside Railway in the GitHub portal?
Status changed to Awaiting Railway Response Railway • 26 days ago
a month ago
That option isn't in GitHub. It belongs to Railway, under your service's Settings tab, and it controls which branch triggers deployments. Once your repository is connected under Service Source, set that branch to main and click Deploy to apply the change.
When a new commit is pushed to main after that, we automatically build and deploy it.
Status changed to Awaiting User Response Railway • 26 days ago
19 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 • 19 days ago