Save a notebook to GitHub
Vertex AI Workbench user-managed notebooks isdeprecated. On April 14, 2025, support for user-managed notebooks ended and the ability to create user-managed notebooks instances was removed. Existing instances will continue to function until March 30, 2026, but patches, updates, and upgrades won't be available. To continue using Vertex AI Workbench, we recommend that youmigrate your user-managed notebooks instances to Vertex AI Workbench instances.
To back up your user-managed notebooks instance and make it availableto others, save the contents of your user-managed notebooks instanceto GitHub.
Create a GitHub repository
If you don't already have aGitHub repository, you must create one.
When you create your GitHub repository make sure that your GitHub repositorycan be cloned by selecting theInitialize this repository with a READMEcheckbox.

Clone your GitHub repository in your user-managed notebooks instance
To clone your GitHub repository in your user-managed notebooksinstance, complete the following steps:
In your GitHub repository, click theCode button,and then click theLocal tab.
Copy theHTTPS URL.
In the Google Cloud console, go to theUser-managed notebooks page.
ClickOpen JupyterLab to openyour user-managed notebooks instance.
In the JupyterLab File Browser, selectthe folder where you want to clone the GitHub repository. For example,the home folder.

In JupyterLab, selectGit > Clone a Repository.
If prompted, enter your credentials.
If you use a GitHub username and password, enter yourGitHub username and password.
If you use two-factor authentication with GitHub,create and use apersonal access token.
In theClone a repo dialog, paste the HTTPS URL for your GitHub repository.

ClickClone.
Configure your user-managed notebooks instance with your GitHub user information
In JupyterLab, selectGit > Open Git Repository in Terminalto open a Git terminal window.
In the Git terminal window, enter the following commands to configureyour Git username and email:
git config --global user.name "YOUR_NAME"git config --global user.email "YOUR_EMAIL"
If your GitHub account requires SSH authentication, completethe following steps to connect your account:
From your Git terminal in your user-managed notebooksinstance, follow GitHub'sinstructions for generating a new SSH key.
Follow theinstructions for adding that SSH key to your GitHubaccount.
Close the Git terminal window.
Add your committed files to your GitHub repository
Your user-managed notebooks instance shows your repositoryas a new folder. If you don'tsee your cloned GitHub repository as a folder, click theRefresh FileList button.

Double-click your repository folder to open it.
Add a new notebook to your user-managed notebooks instance.
To add a notebook file, you can use the menu or the Launcher.
Menu
To add a new notebook file from the menu, selectFile > New > Notebook.

In theSelect kernel dialog, select the kernel for your newnotebook, for example,Python 3, and then clickSelect.
Your new notebook file opens.
Launcher
To add a new notebook file from the Launcher, selectFile > New > Launcher.
Click the tile for the kernel you want to use.

Your new notebook file opens.
Rename your new notebook file.
Menu
SelectFile > Rename notebook. TheRename file dialog opens.
In theNew name field, change
Untitled.ipynbto somethingmeaningful, such asinstall.ipynb.ClickRename.
Launcher
Right-click the
Untitled.ipynbtab and then clickRename notebook. TheRename file dialog opens.In theNew name field, change
Untitled.ipynbto somethingmeaningful, such asinstall.ipynb.ClickRename.
Select theGit tab. Your new notebook is listed in theUntrackedgrouping.
To add the new notebook as a file for your GitHub repository, right-clickthe new notebook and selectTrack. On theGit tab, your notebookis now added to theStaged grouping.
To commit your new notebook to your GitHub repository, on theGit tab,add a commit comment and clickCommit.
To open a Git terminal window, selectGit > Open Git repository in terminal.
In the Git terminal window, enter the
git pushcommand.If you use a GitHub username and password, when prompted, enter yourGitHub username and password.
If you use two-factor authentication with GitHub,create a personal access token to use.
When the
git pushcommand completes, your committed files are inyour GitHub repository.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-11-24 UTC.