-
Notifications
You must be signed in to change notification settings - Fork 302
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Heroku - .git directory is not found! Please specify a valid [dotGitDirectory] in your pom.xml #279
Comments
Are you working on your code in a separate worktree created by |
I encountered this same issue. Heroku apparently doesn't copy the .git folder to your dyno making it impossible to use this plugin. I did find this SO answer and was able to use it as a workaround: http://stackoverflow.com/a/34536363/1437395 See https://gist.github.com/tmullin/bd17e3a05607d2b11349ef73ebbca84d The accepted answer for that SO question is also interesting, but I'd rather use my workaround than create a post-commit hook: http://stackoverflow.com/a/14924922/1437395 |
I just created a heroku account and followed the steps provided in
after this initial test I added the following to the pom.xml:
It should not matter what your config looks like
Build works without any issues as of right now; tested with linux. |
Hi,
later in the build i see
|
Can you outline the steps need to reproduce the issue?? |
Hi, https://github.com/emeraldjava/git-commit-id-heroku-demo the URL's to test the local service are http://localhost:8080/info again, this app fails to deploy on heroku because the git.properties file isn't generated. |
After some testing and the way heroku seems to work there is pretty much barely anything I can do within the plugin to fix this issue. In order to determine the git properties this plugin is meant to have access to the git-repository. Without it its simply impossible to retrieve any information. Since the heroku doesn't copy over the .git-Folder this plugin can't get the author, branch, .... pretty much nothing. The only possible improvement I can see here is to check from the plugin side if the environment variable Downsides:
As a result even if this would be introduced into the plugin only the git-commit and git-commit-id-abbrev information would be available. |
Can you live with the workaround or want something in the plugin? |
Thanks for the investigation. It's a shame heroku doesn't nice with the git repo clone. I can use the alternative options. |
fully agree! Thanks for reporting the issue! |
@TheSnoozer In the tested config, you have 'false' -> The build is OK, but Git information are certainly not available. |
Hi,
I plugged in the 'git-commit-id-plugin' and it works perfectly on a local build. The pom config is
<build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <executions> <execution> <goals> <goal>build-info</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>pl.project13.maven</groupId> <artifactId>git-commit-id-plugin</artifactId> <version>2.2.2</version> </plugin> </plugins> </build>
When i attempt to deploy my app to heroku the build and deploy failed with this error
remote: [ERROR] Failed to execute goal pl.project13.maven:git-commit-id-plugin:2.2.2:revision (default) on project salesninja: .git directory is not found! Please specify a valid [dotGitDirectory] in your pom.xml -> [Help 1]
when i run the basic heroku deploy command of
git push heroku master
has anybody seen or have a workaround for this?
The text was updated successfully, but these errors were encountered: