튜토리얼을 비공개로 설정하려면 호스팅하기 위한 비공개 Git 저장소가 필요합니다.
원하는 Git 저장소 호스팅 서비스를 사용할 수 있습니다. 이 가이드에서는 Google Cloud에서 호스팅되는 비공개 Git 저장소인 Cloud Source Repositories를 사용합니다.
사용자가 튜토리얼에 접근할 수 있도록 사용자가 튜토리얼에 액세스하는 방법을 정의할 수 있는 Cloud Shell의 Cloud Shell에서 열기 기능을 사용할 수 있습니다. 링크를 맞춤설정하는 방법에 대한 자세한 내용은 Cloud Shell에서 열기 가이드를 참조하세요.
Cloud Source Repositories 저장소에서 호스팅되는 튜토리얼의 경우 저장소의 URL을 사용하여 cloudshell_git_repo 매개변수를 정의해야 합니다.
사용자가 링크를 쉽게 찾을 수 있도록 이 링크 스타일을 버튼으로 지정하여 문서에 삽입할 수 있습니다.
[](https://ssh.cloud.google.com/cloudshell/editor?cloudshell_git_repo=https://source.developers.google.com/p/project_name/r/repo_name)
부가기능 도구로 튜토리얼 맞춤설정
사용자에게 튜토리얼에서 사용할 수 있는 커스텀 도구를 제공하여 비공개 튜토리얼 환경을 추가로 맞춤설정할 수 있습니다.
따라서 사용자에게 제공되는 모든 추가 패키지와 커스텀 구성이 포함된 커스텀 Cloud Shell 환경으로 작동하는 Docker 이미지를 만들 수 있습니다. 커스텀 컨테이너 이미지를 만들고 이 컨테이너 이미지를 참조하도록 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"]],["최종 업데이트: 2024-12-21(UTC)"],[],[],null,["# Create private tutorials in Cloud Shell\n\nCloud Shell supports the creation of private tutorials, enabling you\nto design tutorials specifically for your audience.\n\nAfter you've authored tutorials using the\n[Writing tutorials in Cloud Shell](/shell/docs/cloud-shell-tutorials/tutorials) guide\nand followed the best practices detailed in the\n[Tutorial Style guide](/shell/docs/cloud-shell-tutorials/style-guide),\nyou can host your tutorial in a private Git repository to make it available to\nyour users.\n\nHost private tutorials\n----------------------\n\nTo make your tutorial private, you need a private Git repository to host it in.\nYou can use any Git repository hosting service you prefer. This guide uses\n[Cloud Source Repositories](/source-repositories); private Git repositories\nhosted on Google Cloud.\n| **Note:** To use Cloud Source Repositories, you must enable billing on your project. For details on the cost of using Cloud Source Repositories, see the Cloud Source Repositories [pricing guide](/source-repositories/docs/pricing).\n\nTo create a Cloud Source Repositories repository to host your private\ntutorial:\n\n1. Launch the Cloud Shell terminal. For a standalone Cloud Shell session, use [shell.cloud.google.com](https://shell.cloud.google.com).\n2. Create a private repository:\n\n gcloud source repos create \u003cvar label=\"repo_name\" translate=\"no\"\u003eREPO_NAME\u003c/var\u003e\n\n3. Clone your repository to Cloud Shell:\n\n gcloud source repos clone \u003cvar scope=\"REPO_NAME\" translate=\"no\"\u003eREPO_NAME\u003c/var\u003e\n\n4. Move your tutorial file to your locally created repository:\n\n mv \u003cvar class=\"readonly\" translate=\"no\"\u003ePATH/TO/TUTORIAL\u003c/var\u003e \u003cvar scope=\"REPO_NAME\" translate=\"no\"\u003eREPO_NAME\u003c/var\u003e/\u003cvar class=\"readonly\" translate=\"no\"\u003ePATH/TO/TUTORIAL\u003c/var\u003e\n\n5. Go to your local repository:\n\n cd \u003cvar scope=\"REPO_NAME\" translate=\"no\"\u003eREPO_NAME\u003c/var\u003e\n\n6. Add the tutorial to commit:\n\n git add .\n\n7. Commit the files to the repository with a comment describing the\n history of this action:\n\n git commit -m \"Add private tutorial to Cloud Source Repositories\"\n\n8. Using the `git push` command, add the contents of the local repository\n to Cloud Source Repositories:\n\n git push origin master\n\n9. View your repository and its contents in the Google Cloud console:\n\n [Open Cloud Source Repositories](https://source.cloud.google.com/repos)\n\nCreate an Open in Cloud Shell link\n----------------------------------\n\nTo help your users reach your tutorial, you can use the\nCloud Shell's Open in Cloud Shell feature that lets\nyou define how users access your tutorial. For details on how to customize your\nlink, see the [Open in Cloud Shell guide](../open-in-cloud-shell).\n\nFor a tutorial hosted in a\nCloud Source Repositories repository, you'll need\nto define the `cloudshell_git_repo` parameter with the URL of your repository.\n\nAn example of a link with `cloudshell_git_repo` defined: \n\n https://ssh.cloud.google.com/cloudshell/editor?cloudshell_git_repo=https://source.developers.google.com/p/project_name/r/repo_name\n\nYou can style this link as a button to embed in your documentation for\nyour users to easily find: \n\n [](https://ssh.cloud.google.com/cloudshell/editor?cloudshell_git_repo=https://source.developers.google.com/p/project_name/r/repo_name)\n\nCustomize tutorials with add-on tools\n-------------------------------------\n\nYou can further customize your private tutorial experience by providing your\nusers with custom tooling to work with your tutorial.\n\nTo do so, you can create a Docker image that functions as a custom\nCloud Shell environment with all the additional packages and custom\nconfigurations you want made available to your user."]]