How Do I Prevent Files Containing Secrets from Being Pushed to a Repository?
Background
- You can go to the repository details page, choose Files containing secrets cannot be committed. , and select
- CodeArts Repo will refuse push attempts when the name of file to be pushed matches the regular expressions listed below.
This rule does not apply to files that have been pushed.
The following table lists the regular expressions for restricting pushes of files containing secrets and provides some file name examples.
Regular Expression |
File Name Example |
(ssh|config)\/(personal|server)_(rsa|dsa|ed\d+|ecdsa) |
ssh_server_rsa |
_rsa$ |
id_rsa |
_dsa$ |
id_dsa |
_ed25519$ |
id_ed25519 |
_ecdsa$ |
id_ecdsa |
\.(pem|key)$ |
secret.key privatekey.pem |
"[._]history$" |
.bash_history |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot