"Save to GitHub" feature returns authentication error

Hi everyone,

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.

(Sorry if my english is wrong btw.)

2 Likes

Having the same issue. RIP.

Hello,

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:

  1. Log in to your GitHub account.
  2. Navigate to Profile > Settings > Applications > Installed GitHub Apps and uninstall Google AI Studio.
  3. Navigate to Profile > Settings > Applications > Authorized GitHub Apps and revoke permission for Google AI Studio.
  4. Return to Google AI Studio and attempt to save the app to a repository again.
  5. Complete the authorization process, ensuring that you select either all repositories or the appropriate set of repositories.
  6. Try saving the app to GitHub again; if the issue persists, please let us know.

Hi, I encountered the same issue. I have followed the step you provided. The issue persists.

Tried that, it still doesn’t work.

1 Like

Yep - having the same issue as well. Revoking access etc does not work

1 Like

i also have the same issue as well, is it possible because the ai studio github ask doesnt have any write access?

1 Like

nope still failing, showed to authorized yet still fails

It may cause by a conflict of multiple google account login, try @Siddharth_Naik ‘s process in an incognito mode the problem should be solved.

Fix for this issue

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.

Has anyone found a solution?

not yet….I tried every single option….non worked

Same issue, I had to move the project to other account please help