Windows: git: 'secrets' is not a git command
- Dominant language
- Shell
- Stars
- 13.4k
- Forks
- 1.3k
- PR merge metrics
- No merged PRs in 30d
Description
I have tried (and tried, and tried) getting git-secrets to work with GitHub Desktop for Windows without luck.
I have put the git-secrets bash script in one location that is now available within the git shell launched from GitHub Desktop (it's also in %PATH%):
```
curl -o "C:\Program Files\Git\cmd\git-secrets" https://raw.githubusercontent.com/awslabs/git-secrets/master/git-secrets
```
Running `git secrets` in cmd, git-bash AND powershell manually all gives me the "usage" output.
However, trying to commit with GitHub Desktop gives me
```
2017-12-13 16:30:05.7169|INFO|thread: 4|ProcessWrapper|Starting: Process - FileName: 'C:\Users\Stian\AppData\Local\GitHub\PortableGit_f02737a78695063deace08e96d5042710d3e32db\cmd\git.exe
...
2017-12-13 16:30:06.1735|WARN|thread: 1|StandardUserErrors|Showing user error Failed to create a new commit.
GitHub.IO.ProcessException: git: 'secrets' is not a git command. See 'git --help'.
```
I get the option to view error log and also "Open Git Shell". When I do Open Git Shell and execute `git secrets`, that works and gives me the "usage" output again.
Manually running the git.exe file in question with "secrets" also works:
```
C:\Users\Stian>C:\Users\Stian\AppData\Local\GitHub\PortableGit_f02737a78695063deace08e96d5042710d3e32db\cmd\git.exe secrets
usage: git secrets --scan [-r|--recursive] [--cached] [--no-index] [--untracked] [...]
```
Have tried setting Default shell in GitHub Desktop to Cmd, Git Bash and Powershell. They all fail.
Contributor guide
Assessment
This issue has not been assessed yet.