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 |
FAQs FAQs
- Why Can't I View Repositories Created by Other Project Members?
- Is There Any File Size Limit in Repositories?
- Can I Export the Statistics on Code Lines Committed by Members?
- How Do I Prevent Files Containing Secrets from Being Pushed to a Repository?
- Why Can't I See the Repository Synchronization Tab?
- Will Related Git Code Branches Be Automatically Deleted When the Creator of a Git Branch Is Deleted?
- What Do I Do If a Binary File Fails to Be Pushed to CodeArts Repo?
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.
Chatbotmore