You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The machinery currently cloning the template repository breaks if the configured template is in a Git detached HEAD state, e.g., in image zeekurity/zeek:5.0.2:
# Create valid template repo, but in Git detached HEAD state
$ git clone https://github.com/zeek/package-template
$ cd package-template && git checkout origin/master
# Attempt to use the template fails.
$ ZKG_DEFAULT_TEMPLATE=$PWD zkg create --packagedir /tmp/fooTraceback (most recent call last): File "/usr/local/zeek/bin/zkg", line 2770, in <module> main() File "/usr/local/zeek/bin/zkg", line 2767, in main args.run_cmd(manager, args, config, configfile) File "/usr/local/zeek/bin/zkg", line 2085, in cmd_create tmpl = Template.load(config, tmplname, args.version) File "/usr/local/zeek/lib/zeek/python/zeekpkg/template.py", line 100, in load version = repo.head.ref.commit.hexsha[:8] File "/usr/lib/python3/dist-packages/git/refs/symbolic.py", line 272, in _get_reference raise TypeError("%s is a detached symbolic reference as it points to %r" % (self, sha))TypeError: HEAD is a detached symbolic reference as it points to '1d5a647f6e9238bad0f0d1c736e899860d04b17d'
This makes it e.g., hard to bisect regressions in a template with Git, or requires workarounds when implementing CI for a package template as Github checkout by default leaves a repo in detached HEAD state.
The text was updated successfully, but these errors were encountered:
The machinery currently cloning the template repository breaks if the configured template is in a Git detached HEAD state, e.g., in image
zeekurity/zeek:5.0.2
:This makes it e.g., hard to bisect regressions in a template with Git, or requires workarounds when implementing CI for a package template as Github checkout by default leaves a repo in detached HEAD state.
The text was updated successfully, but these errors were encountered: