2024년 6월 17일부터 신규 고객은 Cloud Source Repositories를 사용할 수 없습니다. 이전에 조직에서 Cloud Source Repositories를 사용한 적이 없는 경우 API를 사용 설정할 수 없거나 Cloud Source Repositories를 사용할 수 없습니다. 조직에 연결되지 않은 새 프로젝트는 Cloud Source Repositories API를 사용 설정할 수 없습니다. 2024년 6월 17일 이전에 Cloud Source Repositories를 사용한 조직은 이 변경사항의 영향을 받지 않습니다.
버전 관리 시스템에 보안 키를 절대 저장하지 마세요.
Cloud Source Repositories를 사용하면 사용자가 Google Cloud 저장소에 보안 키를 저장할 수 없습니다. Cloud Source Repositories는 다음 유형의 보안 키를 확인할 수 있습니다.
Google Cloud 서비스 계정 사용자 인증 정보(JSON 형식)
PEM으로 인코딩된 비공개 키(RSA, DSA, PGP 포함)
모든 저장소에서 이 확인 기능을 무료로 사용할 수 있습니다.
보안 키 확인 기능의 작동 방식
사용자가 git push 명령어를 실행하면 이 확인 기능은 보안 키일 수 있는 데이터를 찾습니다. 일치 항목이 있으면 이 기능은 git push를 차단하고 사용자에게 발견한 항목과 위치를 알립니다. 예를 들면 다음과 같습니다.
The push has been rejected because we detect that it contains a private key.
Please check the following commands and confirm that it's intentional:
git show [COMMIT]
You can use `git rev-list --objects --all` to find the files.
To push these files, please run `git push -o nokeycheck`.
시작하기 전에
In the Google Cloud console, on the project selector page,
select or create a Google Cloud project.
[[["이해하기 쉬움","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(UTC)"],[],[],null,["# Detecting security keys\n\nYou should never store security keys in a version-control system.\nCloud Source Repositories can help you prevent users from storing security keys in a\nGoogle Cloud repository. Cloud Source Repositories\ncan check for the following types of security keys:\n\n- Google Cloud service account credentials (JSON format)\n- PEM-encoded private keys (including RSA, DSA, and PGP)\n\nThis checking feature is available for all repositories at no charge.\n\nHow the security-key checking feature works\n-------------------------------------------\n\nWhen a user executes a `git push` command, the checking feature looks for data\nthat might be a security key. If a match is found, the feature blocks the `git`\npush and notifies users what was found and where. For example: \n\n```\nThe push has been rejected because we detect that it contains a private key.\nPlease check the following commands and confirm that it's intentional:\n\ngit show [COMMIT]\n\nYou can use `git rev-list --objects --all` to find the files.\n\nTo push these files, please run `git push -o nokeycheck`.\n```\n| **Note:** To help store security keys more securely, consider using [Cloud Key Management Service](/kms/docs/store-secrets).\n\nBefore you begin\n----------------\n\n\nIn the Google Cloud console, on the project selector page,\nselect or create a Google Cloud project.\n| **Note**: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.\n\n[Go to project selector](https://console.cloud.google.com/projectselector2/home/dashboard)\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nDisable security key detection\n------------------------------\n\nTo disable security key detection, use the following `gcloud` command: \n\n gcloud init\n gcloud source project-configs update --disable-pushblock\n\nEnable security key detection\n-----------------------------\n\nTo enable private key detection, use the following `gcloud` command: \n\n gcloud init\n gcloud source project-configs update --enable-pushblock\n\nOverride security key detection\n-------------------------------\n\nTo override the security key detection feature, use the following `git`\ncommand: \n\n git push -o nokeycheck\n\nWhat's next\n-----------\n\nAfter you set up a Google Cloud repository, you might find the following\ntopics helpful:\n\n- [Controlling access to repositories](/source-repositories/docs/configure-access-control)\n- [Using the source browser](/source-repositories/docs/using-source-browser)"]]