Stay organized with collections
Save and categorize content based on your preferences.
This page describes how to configure the Git proxy feature in Developer Connect.
The Git proxy feature enhances how Developer Connect handles
authentication and network access to source code management systems (SCMs).
When you enable a Git proxy for a connection to an SCM such as GitHub or GitLab,
Developer Connect uses the proxy server to proxy Git requests such as
git clone. When you create a connection using Google Cloud console, the Git proxy
is enabled by default. This way, you only need to grant IAM
permissions to a user or service account instead of managing an SCM
access token in Secret Manager.
For example, enabling a Git proxy on a connection lets you do the following:
Use
Gemini Code Assist
code customization with SCMs in privately-hosted networks, including
on-premise networks.
Clone source code from an external SCM by using Google Cloud authentication
and Identity and Access Management permissions.
Before you begin
Ensure that you have at least one connection in Developer Connect to an
SCM such as GitHub, GitLab, or Bitbucket.
To get the permissions that
you need to configure the Git proxy for a connection,
ask your administrator to grant you the
Developer Connect Admin (developerconnect.admin)
IAM role on the user that enables or disables the Git proxy.
For more information about granting roles, see Manage access to projects, folders, and organizations.
To get the permissions that
you need to issue requests to the Git proxy for a connection,
ask your administrator to grant you the
following IAM roles on the user account or service account that issues Git requests:
Make Git read requests such as git clone:
Git Proxy Reader (roles/developerconnect.gitProxyReader)
Make Git write requests such as git push:
Git Proxy User (roles/developerconnect.gitProxyUser)
View and update Git proxy settings
To view and update Git proxy settings, do the following:
Console
In the Google Cloud console, open Developer Connect.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-25 UTC."],[],[],null,["# Configure and use Git proxy\n\nThis page describes how to configure the Git proxy feature in Developer Connect.\n\nThe Git proxy feature enhances how Developer Connect handles\nauthentication and network access to source code management systems (SCMs).\nWhen you enable a Git proxy for a connection to an SCM such as GitHub or GitLab,\nDeveloper Connect uses the proxy server to proxy Git requests such as\n`git clone`. When you create a connection using Google Cloud console, the Git proxy\nis enabled by default. This way, you only need to grant IAM\npermissions to a user or service account instead of managing an SCM\naccess token in Secret Manager.\n\nFor example, enabling a Git proxy on a connection lets you do the following:\n\n- Use [Gemini Code Assist](https://developers.google.com/gemini-code-assist/docs/overview) code customization with SCMs in privately-hosted networks, including on-premise networks.\n- Clone source code from an external SCM by using Google Cloud authentication and Identity and Access Management permissions.\n\nBefore you begin\n----------------\n\nEnsure that you have at least one connection in Developer Connect to an\nSCM such as GitHub, GitLab, or Bitbucket.\n\n\nTo get the permissions that\nyou need to configure the Git proxy for a connection,\n\nask your administrator to grant you the\n\n\nDeveloper Connect Admin (`developerconnect.admin`)\nIAM role on the user that enables or disables the Git proxy.\n\n\nFor more information about granting roles, see [Manage access to projects, folders, and organizations](/iam/docs/granting-changing-revoking-access).\n\n\nYou might also be able to get\nthe required permissions through [custom\nroles](/iam/docs/creating-custom-roles) or other [predefined\nroles](/iam/docs/roles-overview#predefined).\n\n\nTo get the permissions that\nyou need to issue requests to the Git proxy for a connection,\n\nask your administrator to grant you the\nfollowing IAM roles on the user account or service account that issues Git requests:\n\n- Make Git read requests such as `git clone`: [Git Proxy Reader](/iam/docs/roles-permissions/developerconnect#developerconnect.gitProxyReader) (`roles/developerconnect.gitProxyReader`)\n- Make Git write requests such as `git push`: [Git Proxy User](/iam/docs/roles-permissions/developerconnect#developerconnect.gitProxyUser) (`roles/developerconnect.gitProxyUser`)\n\n\nView and update Git proxy settings\n----------------------------------\n\nTo view and update Git proxy settings, do the following: \n\n### Console\n\n\n1. In the Google Cloud console, open **Developer Connect**.\n\n\n [Go to Developer Connect](https://console.cloud.google.com/developer-connect/connections)\n\n \u003cbr /\u003e\n\n2. Click the **Connections** tab, and then click the name of the connection\n that you want to use.\n\n3. On the **Connection details** page,\n click the **Additional configuration**\n tab.\n\n4. Click the Git proxy toggle to disable or re-enable the Git proxy feature.\n\n\u003cbr /\u003e\n\n### Google Cloud CLI\n\n\n### Enable the Git proxy setting for a connection\n\nTo enable the Git proxy setting for a connection, run the\n`gcloud developer-connect connections update` command: \n\n gcloud developer-connect connections update \u003cvar translate=\"no\"\u003eCONNECTION_NAME\u003c/var\u003e \\\n --location=\u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e \\\n --git-proxy-config-enabled\n\n### Disable the Git proxy for a connection\n\nTo disable the Git proxy setting for a connection, run the\n`gcloud developer-connect connections update` command: \n\n gcloud developer-connect connections update \u003cvar translate=\"no\"\u003eCONNECTION_NAME\u003c/var\u003e \\\n --location=\u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e \\\n --no-git-proxy-config-enabled\n\n### View the Git proxy setting for a connection\n\nTo view details about the Git proxy setting for a connection, run the\n`gcloud developer-connect connections describe` command: \n\n gcloud developer-connect connections describe \u003cvar translate=\"no\"\u003eCONNECTION_NAME\u003c/var\u003e \\\n --location=\u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eCONNECTION_NAME\u003c/var\u003e with the name of your connection.\n- \u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e with the [region](/developer-connect/docs/locations) of your connection.\n\n\u003cbr /\u003e\n\nFind the Git proxy URI\n----------------------\n\nAfter you've enabled a Git proxy, you can find the Git proxy URI for your\nconnection by doing the following: \n\n### Console\n\n\n1. In the Google Cloud console, open **Developer Connect**.\n\n\n [Go to Developer Connect](https://console.cloud.google.com/developer-connect/connections)\n\n \u003cbr /\u003e\n\n2. Click the **Connections** tab, and then click the name of the connection\n that you want to use.\n\n3. In the **Connection details** page, click the **Repositories** tab.\n\n4. Find the repository for your\n connection, and then click **Copy git proxy URL**.\n\n\u003cbr /\u003e\n\n### Google Cloud CLI\n\n\nTo get the Git proxy URI, run the\n`gcloud developer-connect connections git-repository-links describe` command: \n\n gcloud developer-connect connections git-repository-links describe \u003cvar translate=\"no\"\u003eREPOSITORY_NAME\u003c/var\u003e \\\n --connection=\u003cvar translate=\"no\"\u003eCONNECTION_NAME\u003c/var\u003e \\\n --location=\u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eREPOSITORY_NAME\u003c/var\u003e with the name of your repository.\n- \u003cvar translate=\"no\"\u003eCONNECTION_NAME\u003c/var\u003e with the name of your connection.\n- \u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e with the [region](/developer-connect/docs/locations) of your connection.\n\n\u003cbr /\u003e\n\n### Developer Connect API\n\n\nThe Git proxy URI is located in the `git_proxy_url` field of\nthe\n[GitRepositoryLink](/developer-connect/docs/api/reference/rest/v1/projects.locations.connections.gitRepositoryLinks#GitRepositoryLink)\nfor your connection.\n\n\u003cbr /\u003e\n\nIssue requests to the Git proxy\n-------------------------------\n\nAfter you have your Git proxy URI, you can issue requests to the Git proxy\nby doing the following:\n\n1. Configure the Git CLI to use the Google Cloud CLI credential helper:\n\n `git config --global credential.'https://*.developerconnect.dev'.helper gcloud.sh`\n2. Issue a request, such as `git clone`, to the Git proxy:\n\n git clone https://\u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e.developerconnect.dev/\u003cvar translate=\"no\"\u003ePROJECT_NAME\u003c/var\u003e/\u003cvar translate=\"no\"\u003eCONNECTION_NAME\u003c/var\u003e/\u003cvar translate=\"no\"\u003eREPOSITORY NAME\u003c/var\u003e\n\n If you don't want to use a credential helper, then you can embed the cloud\n access token into the request instead: \n\n git clone https://unused:$(gcloud auth print-access-token)@\u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e-git.developerconnect.dev/\u003cvar translate=\"no\"\u003ePROJECT_NAME\u003c/var\u003e/\u003cvar translate=\"no\"\u003eCONNECTION_NAME\u003c/var\u003e/\u003cvar translate=\"no\"\u003eREPOSITORY NAME\u003c/var\u003e\n\n Replace the following:\n - \u003cvar translate=\"no\"\u003eREPOSITORY_NAME\u003c/var\u003e with the name of your repository.\n - \u003cvar translate=\"no\"\u003eCONNECTION_NAME\u003c/var\u003e with the name of your connection.\n - \u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e with the [region](/developer-connect/docs/locations) of your connection.\n\n\u003cbr /\u003e"]]