Bug 785614

Summary: etckeeper init should really run git config --add receive.denyCurrentBranch ignore
Product: [Fedora] Fedora Reporter: Paul Wouters <pwouters>
Component: etckeeperAssignee: Thomas Moschny <thomas.moschny>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: thomas.moschny
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-02-08 20:49:52 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Paul Wouters 2012-01-30 00:36:54 UTC
Description of problem:

you cannot git push a commit to a cloned etckeeper repository because git refuses to push to a checked out branch per default. Obviously, the master tree of /etc on the remote is checked out :)

This can be fixed by running:

 git config --add receive.denyCurrentBranch ignore 

in the "etckeeper init" command.

Comment 1 Thomas Moschny 2012-02-08 20:37:02 UTC
Forwarding to upstream.

Comment 2 Thomas Moschny 2012-02-08 20:49:52 UTC
Quoting upstream (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=659160#10) :

Pushing into a checked out git repository is unsafe. /etc is the most
important thing on your system. This combination seems very unwise to
me, and certianly not a good default. 

Especially since many etckeeper users are probably not expert git users.
Those who think they know how to handle pushes into checked out branches
also know where the config is.