git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Git 2.45.1 - What is the right way to clone with global hooks disabled?

From
Brooke Kuhlmann <brooke@alchemists.io>
Date
May 15, 2024, 15:53 UTC
Message-ID
<FAFA34CB-9732-4A0A-87FB-BDB272E6AEE8@alchemists.io>
Hello. đź‘‹
With the release of Git 2.45.1, I can no longer do this when cloning trusted repositories (my own) for build and deployment purposes:
git clone --config core.hooksPath=/dev/null https://github.com/bkuhlmann/infusible
I have automation in place where I want my global Git Hooks to be ignored when cloning like this. The solution is to do this:
GIT_CLONE_PROTECTION_ACTIVE=false git clone --config core.hooksPath=/dev/null https://github.com/bkuhlmann/infusible
...but is there a better, more secure, way to clone a repository while ignoring any global Git Hooks from firing without a lot of effort?
Thanks.
Next: brian m. carlson
Message 1 of 7 in “Git 2.45.1 - What is the right way to clone with global hooks disabled?”
  1. Brooke KuhlmannMay 15, 2024
  2. brian m. carlsonMay 15, 2024
  3. Junio C HamanoMay 16, 2024
  4. Johannes SchindelinMay 16, 2024
  5. Brooke KuhlmannMay 16, 2024
  6. Junio C HamanoMay 16, 2024
  7. Johannes SchindelinMay 17, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.