Deze pagina is nog niet beschikbaar in uw eigen taal. We werken er hard aan om meer taalversies toe te voegen. Bedankt voor uw steun.

On this page

Show all

Help Center/ CodeArts Repo/ FAQs/ FAQs/ How Do I Prevent Files Containing Secrets from Being Pushed to a Repository?

How Do I Prevent Files Containing Secrets from Being Pushed to a Repository?

Updated on 2023-12-04 GMT+08:00

Background

  • You can go to the repository details page, choose Settings > Commit Rules, and select Files containing secrets cannot be committed.
  • CodeArts Repo will refuse push attempts when the name of file to be pushed matches the regular expressions listed below.
NOTICE:

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

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback