Deployment failed: 'Unable to find at branch "".'

I am trying to deploy a new app (it’s not the first time I do this) and for whatever reason streamlit does not recognise my Git repo an gives me an ‘Unable to find at branch “”.’ I found tons of posts related to this issue, but nothing helped. I logged in and out of streamlit/git, removed connection and so on …

Does anyone know why this issue occurs?

It looks like you are using an organization or user on GitHub beginning with e (looking at the GitHub url) but you are currently in a workspace beginning with a (looking in the upper right corner).

Are you by chance trying to deploy something from an organization instead of your personal account? If so, you will need to authorize the organization and also make sure to switch to that organization in the upper right corner of the Streamlit Cloud admin panel.

Hey @mathcatsand
first of all thx for your response! You are right, it’s an organization repo, so that everything is in one place and my team can access it as well.


  1. How do I authorize the organization (I haven’t come across anything in this regard)?
  2. “Switching my admin panel to the organization” means I have to login with the email/credentials of the GitHub organization account of my employer, right? I am not sure if I will get the information due to security reason … does it have to be this way?

If you don’t own the organization, you will need to enlist the help of the owner. I know for me, with my own organization, if I didn’t already have it authorized:

  1. Try to sign out of everything (Github, Google, anything related to your Streamlit account).
  2. When you sign back in, you may get prompted to reauthorize at which point you can check the box at the bottom to allow the organization at the same time you authorize your login.

If you don’t get the authorization prompt upon logging in, you can go to GitHub, revoke Streamlit’s access to your account, then when you go back to the Streamlit admin panel it will have to ask you to grant access to your GitHub account again and you can check the box at the bottom to add the permission for the organization.

Once the organization is authorized, then while logged into the Streamlit admin panel (as you), you can switch to your organization’s workspace in the upper right. Because of some fiddly bits with the GitHub api, a higher-level of authority needs to grant permission to Streamlit’s servers to access the repos. (I haven’t tested it, but you may still be able to publish through a non-owner account as long as the owner-account has created the authorization for the system’s to communicate…)

Worked for me, thanks!
I had to go into github and revoke access under: settings/applications/Authorized oauth apps
That forced the re-auth allowing me to add the organization permissions