For clarity on multiple posts in this forum like below creating a topic on the real issue.
AI Studio can only sync to a private account’s repositories, not to an organzation’s repositories.
Steps to reproduce:
Make sure your AI Studio account is not linked to any github account.
Click the Save to Github button in AI Studio
In the popup you will see a treeview with your personal account and the organization you are admin of
Select the organization
Select “access to all repositories”. I assume you need rights to the root of the organization in order to create a new repository for that org.
A button “On Main“ show on the top not clear what it does.
Click “Create Git Repo“
The error shows “Failed to create GitHub repository, Insufficient permissions to create the GitHub repository. Please check your permissions for the AI Studio App on GitHub“.
I have tried uninstalling the AI Studio app from both personal and org accounts, re install, nothing helps.
For example, I am able to link my org account to Firebase Studio.
I used this little hack to make it work for me: (BUG connecting GitHub ORG to AI Studio)
Disconnect AI Studio from your GitHub account
Settings > Applications
In both tabs click Uninstall (Installed and Authorized)
Go back to the AI Studio project
No need to create a new one or clear cache, but for safety you can try
Reconnect AI Studio to your personal GitHub account (not the org) and create a new project there
Transfer the project ownership to the ORG and return to AI Studio
It will show an error because the project no longer exists in the same location
But if you click the project URL shown at the top of the tab, it will take you to the project inside the ORG
Remove AI Studio from your GitHub account again
Repeat step 1 and uninstall in both places
Refresh AI Studio without cache and connect to GitHub again
This time connect using the ORG
It should find the project and from now on sync automatically