1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

【Git】Matched one or more prohibited patternsが出てきたときの対処法

Last updated at Posted at 2021-01-13

前提

コンフリクトを解消した後に

% git add .
% git commit

を実行すると

エラー内容

[ERROR] Matched one or more prohibited patterns

Possible mitigations:
- Mark false positives as allowed using: git config --add secrets.allowed ...
- Mark false positives as allowed by adding regular expressions to .gitallowed at repository's root directory
- List your configured patterns: git config --get-all secrets.patterns
- List your configured allowed patterns: git config --get-all secrets.allowed
- List your configured allowed patterns in .gitallowed at repository's root directory
- Use --no-verify if this is a one-time false positive

が表示されて次に進めなくなります。

そこで、エラー文を読んでみると、最後の行に--no-verifyを使ってみてと書いてありますね。
これっぽいです。

結論、オプションで--no-verifyを使います

% git add .
% git commit --no-verify

これでcommit mergeができると思います。
以上です。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?