question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Colab can't save changes to GitHub public and private reports

See original GitHub issue

Describe the current behavior

Colab can’t save changes to GitHub public and private reports

Hi Folks,

A bit of a mystery here. I need this to work urgently, so any help I will greatly appreciate.

Nothing has worked so far… I am at a loss and I am desperately looking for help.

Colab cannot save to any of my GitHub repos regardless whether they are public or private.

The error I get: “You do not have permission to save this notebook. To keep your changes, make a copy of the notebook.”

State:

  • Both my Google and GitHub accounts are standard accounts.

  • I have approved and authorized Colab with GitHub access.

  • I have “Access private repositories and organisations” ticked.

  • I have Adblock Plus disabled for the Colab site.

  • I have all permissions to the site set to either Ask(default) or Allow(default) and I even changed Pop-ups and redirects to Allow.

  • The browser I use is Chrome, but I have also tried it in Firefox and on a different computer - I still get the same error.

  • I have tried deleting all cookies and site data for both Colab and GitHub.

  • I have tried revoking GitHub access from Colab and requesting it again.

Workflows to reproduce bug:

  • File -> Open notebook -> GitHub tab -> select a PUBLIC repository -> Try to save -> Get error: "You do not have permission to save this notebook. To keep your changes, make a copy of the notebook."

  • File -> Open notebook -> GitHub tab -> select a PRIVATE repository -> Try to save -> Get error: "You do not have permission to save this notebook. To keep your changes, make a copy of the notebook."

I tried creating a new notebook in Colab and saving it to GitHub - this works, it commits it to the repo, however when I open the newly notebook created book in Colab I get the same error “You do not have permission to save this notebook. To keep your changes, make a copy of the notebook.”.

Here are more details and things I have tried to troubleshoot:

  • I was a member of an organization in GitHub, of which I do not have rights to modify the organization’s settings. I thought this might cause problems, so despite me not wanting to do it, I left the organisation and it got removed my account. I gave it more than 24h in case it needs to converge but this did not fix the issue, I still get the same error.

  • I had applied and received approval for GitHub sponsorship, but had not set it up, so I thought it might be causing issues. I revoked it and my GitHub sponsorship account got closed.

  • I used Chrome Developer Tools to try and get some more info:

    • The only request, when I save, which gets made in the Network tab is this one:
    curl 'https://colab.research.google.com/analytics?authuser=0' \
    -H 'authority: colab.research.google.com' \
    -H 'sec-ch-ua: " Not A;Brand";v="99", "Chromium";v="96", "Google Chrome";v="96"' \
    -H 'dnt: 1' \
    -H 'content-type: application/x-www-form-urlencoded;charset=UTF-8' \
    -H 'sec-ch-ua-mobile: ?0' \
    -H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36' \
    -H 'x-colab-experiment: 20730102,20730120' \
    -H 'sec-ch-ua-platform: "macOS"' \
    -H 'accept: */*' \
    -H 'origin: https://colab.research.google.com' \
    -H 'x-client-data: CIm2yQEIprbJAQjEtskBCKmdygEIhIbLAQjq8ssBCJ75ywEI1vzLAQjnhMwBCLWFzAEIy4nMAQitjswBCNuOzAEIm4/MAQjSj8wBCNmQzAEYjp7LAQ==' \
    -H 'sec-fetch-site: same-origin' \
    -H 'sec-fetch-mode: cors' \
    -H 'sec-fetch-dest: empty' \
    -H 'referer: https://colab.research.google.com/' \
    -H 'accept-language: en-GB,en;q=0.9,bg-BG;q=0.8,bg;q=0.7,en-US;q=0.6' \
    -H 'cookie: [XXX-SANITIZED-XXX]' \
    --data-raw '{"notebook_name":"Untitled1.ipynb","notebook_id":"https://github.com/atkuzmanov/googcol-test-1/blob/main/Untitled1.ipynb","colab_version_tag":"colab-20211215-060053-RC00_416524343","session_id":1625868743325649,"user_action":{"action":"save","source":1}}' \
    --compressed
    

    And this request gets:

    Request URL: https://colab.research.google.com/analytics?authuser=0
    Request Method: POST
    Status Code: 204 
    

Please do not hesitate to let me know if you need any more info.

I need this to work rather urgently, so any help I will greatly appreciate.

Thanks you so much, atkuzmanov

Describe the expected behavior Colab should be able to save to any of my GitHub repos regardless whether they are public or private. At this point I am desperate and even only being able to save to public repos would be great!

What web browser you are using Chrome (Macintosh; Intel Mac OS X 10_14_6)

Additional context Link to a minimal, public, self-contained notebook that reproduces this issue.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:3
  • Comments:11 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
corrieanncommented, Dec 17, 2021

Unfortunately, I suspect you’re just running into an issue of bad UX on our side. In order to save back to GitHub you always have to use “Save a copy in GitHub”. Colab doesn’t yet support auto-save or Ctrl+S saving back to GitHub because it requires making a commit back to the repo but it’s a bit misleading that the intended save flow looks like it’s making another copy. So, work-around is “Save a copy in GitHub” – hopefully that works for you for now.

1reaction
corrieanncommented, Dec 17, 2021

I filed an internal feature request for this issue. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Colab can't save changes to GitHub PUBLIC and PRIVATE ...
File -> Open notebook -> GitHub tab -> select a PRIVATE repository -> Try to save -> Get error: "You do not have...
Read more >
Unable to save notebook to private Github repo · Issue #124
I'm trying to save my colab notebook to a private Github ... GitHub access to view and edit private repositories and organizations.
Read more >
Saving to GitHub · Issue #1975 · googlecolab/colabtools
The save fails because the Colab is trying to save it in the source where I don't have write access. ... Expected behavior:...
Read more >
Unable to save to github · Issue #2559 · googlecolab/colabtools
Auto save functionality doesn't work for notebooks opened from GitLab even though full access to private repo is granted.
Read more >
Students unable to access Colab in Google Workspace for ...
Chrome on Mac OS Big Sur. ... Link to a minimal, public, self-contained notebook that reproduces this issue. Share the file using your...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found