Open bjfletcher opened 7 years ago
What's the output of grep --version
? How did you add the pattern to git-secrets? What does the pattern look like in your .git/config?
in my case I got the same result (Invalid range end):
git secrets --list
secrets.providers cat /path/to/credential/patterns.txt
patterns.txt content:
MY_KEY( )*=( )*[a-zA-Z0-9-_.]{90,}
I added as explained in the example:
git secrets --add-provider -- cat /path/to/credential/patterns.txt
What does the pattern look like in your .git/config?
[secrets]
providers = cat /Users/elara/Documents/gitsec/credential_patterns.txt
OS: macos mojave grep (BSD grep) 2.5.1-FreeBSD
[a-zA-Z\\-0-9]
If you're looking for a-z
and A-Z
and \
and -
and 0-9
then you need to move the -
to the end, otherwise grep is trying to match \-0
which is not a valid character range.
Hi there,
I'm trying to get it to match email addresses (RFC 5322), which I don't want to commit.
(([^<>()\\[\\]\\\\.,;:\\s@"]+(\\.[^<>()\[\]\\\\.,;:\\s@"]+)*)|(".+"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))
The above works great when tested in JavaScript. But
git secrets --scan
fails with the following output: