[](https://shell.cloud.google.com/cloudshell/editor?cloudshell_git_repo=http://path-to-repo/sample.git)
如要將相同功能嵌入網站,請使用以下等效的 HTML 程式碼片段:
<a href="https://shell.cloud.google.com/cloudshell/editor?cloudshell_git_repo=http://path-to-repo/sample.git">
<img alt="Open in Cloud Shell" src ="https://gstatic.com/cloudssh/images/open-btn.svg">
</a>
在 Cloud Shell 連結產生器中開啟
如要進一步定義「Open in Cloud Shell」連結的行為,您可以使用下方表單,嘗試在 Cloud Shell 中開啟存放區所需的參數。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-09-04 (世界標準時間)。"],[],[],null,["# Open in Cloud Shell\n\nThe Open in Cloud Shell feature allows you to publish a link that\nopens the Google Cloud console with a Git repository cloned into Cloud Shell and/or starts Cloud Shell with a custom\nimage. You can also print instructions to the terminal to help users interact\nwith the content.\n\nOpen in Cloud Shell links help developers experiment with your code\nsamples and APIs without having to download the Google Cloud CLI, install\nrequired dependencies, or search for relevant source files. This page explains\nhow to add an Open in Cloud Shell link to your Git repository.\n| **Note:** Only GitHub and Bitbucket repositories are permitted by default. If you would like to add a different repository, [send feedback]() with the repository type you'd like to use with *Open in Cloud Shell*.\n\nURL parameters\n--------------\n\nAn Open in Cloud Shell link, optionally embedded in a button image,\ncan be added to the README.md file of any directory in your Git repository. The\nrecommended location for this link is the root README.md file of your Git\nrepository.\n\n### Required URL parameter\n\nTo create this link, use a base URL of `shell.cloud.google.com` (or any page in\nthe Google Cloud console that begins with `console.cloud.google.com`) with\nthe following required URL parameter:\n\n### Optional URL parameters\n\nYou can also specify any of the following optional parameters:\n\nExamples\n--------\n\nTo embed a button to open a sample Git repository in Cloud Shell,\ninclude the following Markdown in your repository's README.md file: \n\n [](https://shell.cloud.google.com/cloudshell/editor?cloudshell_git_repo=http://path-to-repo/sample.git)\n\nTo embed the same functionality into a website, use this equivalent HTML\nsnippet: \n\n \u003ca href=\"https://shell.cloud.google.com/cloudshell/editor?cloudshell_git_repo=http://path-to-repo/sample.git\"\u003e\n \u003cimg alt=\"Open in Cloud Shell\" src =\"https://gstatic.com/cloudssh/images/open-btn.svg\"\u003e\n \u003c/a\u003e\n\nOpen in Cloud Shell link generator\n----------------------------------\n\nTo define the behavior of the Open in Cloud Shell link more\nspecifically, you can use the form below to experiment with parameters needed to\nopen your repository in Cloud Shell.\n**Choose your preferred link format:**\n\nMarkdown HTML\n\n**Set at least one of the following parameters:** Git repository:\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nDocker image:\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n**Specify any optional parameters you'd like to include:** Git branch:\n\n\u003cbr /\u003e\n\nWorkspace:\n\n\u003cbr /\u003e\n\nOpen in Editor:\n\n\u003cbr /\u003e\n\nPrint:\n\n\u003cbr /\u003e\n\nTutorial File:\n\n\u003cbr /\u003e\n\nGenerate Snippet \n\n```\n\n```\n\n\u003cbr /\u003e"]]