# Issue with creating new Beat

**URL:** <https://discuss.elastic.co/t/issue-with-creating-new-beat/260339>\
**Category:** Beats\
**Tags:** beats-development, metricbeat\
**Created:** [January 6, 2021, 12:30pm UTC](https://discuss.elastic.co/t/issue-with-creating-new-beat/260339 "2021-01-06T12:30:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![yuv](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yuv/32/81833_2.png) [@yuv](https://discuss.elastic.co/u/yuv)\
**Post date:** [January 6, 2021, 12:30pm UTC](https://discuss.elastic.co/t/issue-with-creating-new-beat/260339/1 "2021-01-06T12:30:25Z")

</div>

Hi,

i've followed the following documentation [https://www.elastic.co/guide/en/beats/devguide/7.11/new-beat.html](https://www.elastic.co/guide/en/beats/devguide/7.11/new-beat.html)  
for creating new beat. While i'm trying to build it i got the below issues.  
What i'm i doing wrong ? how can i fix it?  
thanks!!

```auto
>> build: Building newbeat
fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
Error: template: inline:1:128: executing "inline" at <commit>: error calling commit: running "git rev-parse HEAD" failed with exit code 128
failed to expand template '-s -X github.com/elastic/beats/v7/libbeat/version.buildTime={{ date }} -X github.com/elastic/beats/v7/libbeat/version.commit={{ commit }}'
github.com/elastic/beats/v7/dev-tools/mage.expandTemplate
	/usr/local/go/pkg/mod/github.com/elastic/beats/v7@v7.0.0-alpha2.0.20210104113442-69489f002ed9/dev-tools/mage/common.go:100
github.com/elastic/beats/v7/dev-tools/mage.Expand
	/usr/local/go/pkg/mod/github.com/elastic/beats/v7@v7.0.0-alpha2.0.20210104113442-69489f002ed9/dev-tools/mage/common.go:56
github.com/elastic/beats/v7/dev-tools/mage.MustExpand
	/usr/local/go/pkg/mod/github.com/elastic/beats/v7@v7.0.0-alpha2.0.20210104113442-69489f002ed9/dev-tools/mage/common.go:62
github.com/elastic/beats/v7/dev-tools/mage.Build
	/usr/local/go/pkg/mod/github.com/elastic/beats/v7@v7.0.0-alpha2.0.20210104113442-69489f002ed9/dev-tools/mage/build.go:139
github.com/elastic/beats/v7/dev-tools/mage/target/build.Build
	/usr/local/go/pkg/mod/github.com/elastic/beats/v7@v7.0.0-alpha2.0.20210104113442-69489f002ed9/dev-tools/mage/target/build/build.go:26
main.Build
	/usr/local/go/src/github.com/user/newbeat/magefile.go:82
main.main.func14
	/usr/local/go/src/github.com/user/newbeat/mage_output_file.go:511
main.main.func12.1
	/usr/local/go/src/github.com/user/newbeat/mage_output_file.go:276
runtime.goexit
	/usr/local/go/src/runtime/asm_amd64.s:1373

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 3, 2021, 2:30pm UTC](https://discuss.elastic.co/t/issue-with-creating-new-beat/260339/2 "2021-02-03T14:30:28Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
