Detach Git Repos - Amazon SageMaker
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Detach Git Repos

Important

As of November 30, 2023, the previous Amazon SageMaker Studio experience is now named Amazon SageMaker Studio Classic. The following section is specific to using the Studio Classic application. For information about using the updated Studio experience, see Amazon SageMaker Studio.

This guide shows how to detach Git repository URLs from an Amazon SageMaker domain or user profile using the Amazon CLI or Amazon SageMaker console.

Detach a Git repo using the Amazon CLI

To detach all Git repo URLs from a domain or user profile, you must pass an empty list of code repositories. This list is passed as part of the JupyterServerAppSettings parameter in an update-domain or update-user-profile command. To detach only one Git repo URL, pass the code repositories list without the desired Git repo URL. This section shows how to detach all Git repo URLs from your domain or user profile using the Amazon Command Line Interface (Amazon CLI).

Detach from a domain

The following command detaches all Git repo URLs from a domain.

aws sagemaker update-domain --region region --domain-name domain-name \ --domain-settings JupyterServerAppSettings={CodeRepositories=[]}

Detach from a user profile

The following command detaches all Git repo URLs from a user profile.

aws sagemaker update-user-profile --domain-name domain-name --user-profile-name user-name\ --user-settings JupyterServerAppSettings={CodeRepositories=[]}

Detach the Git repo using the SageMaker console

The following sections show how to detach a Git repo URL from a domain or user profile using the SageMaker console.

Detach from a domain

Use the following steps to detach a Git repo URL from an existing domain.

To detach a Git repo URL from an existing domain
  1. Open the Amazon SageMaker console at https://console.amazonaws.cn/sagemaker/.

  2. On the left navigation pane, choose Admin configurations.

  3. Under Admin configurations, choose domains.

  4. Select the domain with the Git repo URL that you want to detach.

  5. On the domain details page, choose the Environment tab.

  6. On the Suggested code repositories for the domain tab, select the Git repository URL to detach.

  7. Choose Detach.

  8. From the new window, choose Detach.

Detach from a user profile

Use the following steps to detach a Git repo URL from a user profile.

To detach a Git repo URL from a user profile
  1. Open the Amazon SageMaker console at https://console.amazonaws.cn/sagemaker/.

  2. On the left navigation pane, choose Admin configurations.

  3. Under Admin configurations, choose domains.

  4. Select the domain that includes the user profile with the Git repo URL that you want to detach.

  5. On the domain details page, choose the User profiles tab.

  6. Select the user profile with the Git repo URL that you want to detach.

  7. On the User details page, choose Edit.

  8. On the Studio settings page, select the Git repo URL to detach from the Suggested code repositories for the user tab.

  9. Choose Detach.

  10. From the new window, choose Detach.