Safe-commit-hook: prevent developers from checking in sensitive files
1–9 of 9 posts
Re: Safe-commit-hook: prevent developers from checking in sensitive files
#2I've often wondered whether it would be worthwhile for git to include some global configuration to allow global pre/post commit hooks which are opt-out on a per repository basis. If I could do this for every repository our developers created automatically - I would.
Re: Safe-commit-hook: prevent developers from checking in sensitive files
#3Still requires manual effort. We have 100s of repositories at work, and if we were lucky enough to have 100s of developers - they'd all have to do this manually every time. I've often wondered whether it would be worthwhile for git to include some global configuration to allow global pre/post commit hooks which are opt-out on a per repository basis. If I could do this for every repository our developers created autom…
However, it seems reasonable to have an explicit option to clone, such as --use-hooks, that allows repositories to enable their local hooks automatically.
Apart from that, you could have a server-side hook that prevents any push containing such files.
Re: Safe-commit-hook: prevent developers from checking in sensitive files
#4Still requires manual effort. We have 100s of repositories at work, and if we were lucky enough to have 100s of developers - they'd all have to do this manually every time. I've often wondered whether it would be worthwhile for git to include some global configuration to allow global pre/post commit hooks which are opt-out on a per repository basis. If I could do this for every repository our developers created autom…
git upstream has rejected that for security reasons; git clone should not produce a repository that runs arbitrary code on the user's system. However, it seems reasonable to have an explicit option to clone, such as --use-hooks, that allows repositories to enable their local hooks automatically. Apart from that, you could have a server-side hook that prevents any push containing such files.
Re: Safe-commit-hook: prevent developers from checking in sensitive files
#5Still requires manual effort. We have 100s of repositories at work, and if we were lucky enough to have 100s of developers - they'd all have to do this manually every time. I've often wondered whether it would be worthwhile for git to include some global configuration to allow global pre/post commit hooks which are opt-out on a per repository basis. If I could do this for every repository our developers created autom…
Re: Safe-commit-hook: prevent developers from checking in sensitive files
#6Still requires manual effort. We have 100s of repositories at work, and if we were lucky enough to have 100s of developers - they'd all have to do this manually every time. I've often wondered whether it would be worthwhile for git to include some global configuration to allow global pre/post commit hooks which are opt-out on a per repository basis. If I could do this for every repository our developers created autom…
git upstream has rejected that for security reasons; git clone should not produce a repository that runs arbitrary code on the user's system. However, it seems reasonable to have an explicit option to clone, such as --use-hooks, that allows repositories to enable their local hooks automatically. Apart from that, you could have a server-side hook that prevents any push containing such files.
If you do this, then developers only need to install the hooks once when they set up their machine, and then will already have them when they clone a repo.
Re: Safe-commit-hook: prevent developers from checking in sensitive files
#7Re: Safe-commit-hook: prevent developers from checking in sensitive files
#8> schema.rb
Don't you kind of need this in a rails project?
Re: Safe-commit-hook: prevent developers from checking in sensitive files
#9https://github.com/jandre/safe-commit-hook/blob/master/git-d... > schema.rb Don't you kind of need this in a rails project?
That said I've seen this done, but wouldn't recommend it. Your schema.rb is helpful to collaborators and running through all of your migrations on a new base is silly.