I am experiencing an issue with the “Save to GitHub” feature in Google AI Studio. I can’t create a repository of the project/application i’ve created in Google AI Studio as i receive an error after clicking on “Create Git repo”. The error message is the following: Failed to create GitHub repository: authentication error. Please try again. You can see the error message also in the picture below.
I am experiencing this issue since 1 or 2 months, and i don’t know how to fix it. Is there a fix?
Thanks in advance for help.
This appears to be an issue related to the authorization established when connecting AI Studio to GitHub for the first time. Please attempt the following steps to see if this resolves the problem:
Hi everyone,
I have found a fix for this issue: If you are using Google Chrome, create a new Chrome profile and use it, if you do not use Google Chrome, just use a different browser where you are not logged in with multiple google Accounts.
(Use a new Chrome profile or a different browser, you can also use a incognito tab for this to work)
Step 1: Log into your Google Account
Step 2: Log into your GitHub Account
Step 3: Try syncing it again with GitHub
Step 4: It will work
Root Cause
The root cause is that the issue is caused by a conflict in the Auth. If you are logged into multiple Google accounts, AI Studio might try to create the repository by using a different Google account than your current selected one. Note: As example, if you are logged into 4 different Google accounts, and you are using the third one in Google AI Studio to create the repository, AI Studio tries to create the repository with your first signed-in Google account because it does not use the u/(id) route.