LoginSignup
5
3

More than 3 years have passed since last update.

【Git】git: 'secrets' is not a git command. See 'git --help'.というエラーがでたときの解決方法

Posted at

環境

macOS 10.15.4
git 2.20.1

git: 'secrets' is not a git command. See 'git --help'.というエラーがでた場合の対処方法

$ git commit -m "commit"
git: 'secrets' is not a git command. See 'git --help'.

このエラーがでたときにはgit-secretsがインストールされていませんよ!というエラー表示になります。このgit-secretsはAWSの鍵などを誤ってGitリポジトリにプッシュしてしまうのを防ぐためのツールです。この状態ですとCommitができませんのでインストールをします。

$ brew install git-secrets

※OSはmacOSです。ちなみにHomebrewのインストールが事前に必要なので済んでいない方は下記のリンクからインストールが必要です。
https://brew.sh/index_ja

これで無事にインストールされましたのでCommitが正常に行えます^_^

5
3
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
5
3