I have connected my work Github account to Streamlit. When I try to deploy an app, it is expecting the repo to be from my specific account (my-user-name/repo-name). However, the repository is part of my organisation on Github. It does not recognise ‘org-name/repo-name’ and gives a ‘This repository does not exist’ error.
I have tried using the alternate option of pasting the full URL. That gives the following error -
I just want to summarise the solution in case it can help others -
If the repository is under an Organisation in Github, then Streamlit needs to be given access to that Organisation as well and not just the user account of the person trying to deploy the app.
There needs to be at least one public repository inside the Organisation for Streamlit to establish a connection at the time of deployment on Streamlit Cloud. The app that is being deployed can itself be in a separate private repository. The support team mentioned that once deployment has been completed, this public repository can be deleted, but I have not tested this point.
Giving Streamlit access to the Organisation can only be done by the person who owns the Organisation in Github. When you try to connect your Github account to Streamlit, the authentication request page that appears also has an option to request access to the Organisation your account belongs to (it is possible to miss it). In case you missed it, you can delink your Github account from Streamlit and repeat the process. Once you click on the button to request access to the Organisation for Streamlit, the owner will receive an email and they can approve the request.
OK I managed to get this to work by asking another owner of the github org to authenticate and grant org access. That said, @snehankekre this was a bit of a winding road. Here’s what did not work –
A colleague made me an owner of our github org. I then went to streamlit settings, attemped to disconnect and reconnect my github account. However, I was not prompted to authorize streamlit’s access to the org.
A colleague who is an owner of the org created their own streamlit account. They were prompted to authorize access to the github org and did so. When they attempted to create the streamlit app they received an error indicating that they were in the wrong workspace and needed to switch using the menu in the upper right. However, clicking their avatar did not reveal an option for a separate workspace.
That said, after step 2 I reattempted to create the app, received the same message about switching workspaces, and was able to do so. So, success in the end!
We have been totally unable to get Streamlit Cloud to ask to authorize an organization. Org owner, and non-owners, have created Streamlit accounts. Connected and disconnected from GitHub. Nothing has triggered the prompt to authorize the org.
@Caroline I do! The repo that we’re trying to work with is currently public, and I’m not the owner myself, but when an owner tries to do it, they are just not seeing the option to change workspace. Any ideas?
It finally worked for me - I am not 100% what I did, but basically I deleted the app from my personal GIT account, logged in to my organisation GITHUB account, then log out completely from steamlit and tried to login again via my github account. Then, finally it’s asked me to authorise my organization Githib account, and I managed to see it in the workspaces.
If you have already granted Streamlit access to your personal account and you are authorized to grant access for an organization:
Open GitHub, click your profile in the upper right hand corner, select Settings
Select Applications in the left navigation menu
Select the Authorized OAuth Apps tab
Find the official Streamlit app and click Streamlit
You will see a Grant button at the bottom for your organizations
Revoke access to your personal account if already granted. Then, when you sign back in to Streamlit Share and are prompted to authorize, check the boxes for your organization(s) at the bottom in the dialog.