-
Notifications
You must be signed in to change notification settings - Fork 16
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
"not a git repository (or any of the parent directories)" error when building in AWS CodeBuild #317
Comments
Hi! Does your app builds without using plugin? |
hi @ikenfin - I've isolated the issue to the plugin. Specifically, the errors occurs when (1) the plugin is included and (2) there's no git repo in the hierarchy. I've added |
Try also set setCommits: {
auto: false,
commit: "<commit_hash>",
repo: "<repository>"
} |
@ikenfin adding this configuration option did not help. You're right that there's no git repo in the hierarchy of folders where build is executed - and there shouldn't be one. A bit more context on why I believe that this is a common use case: I'm using AWS CodePipeline as my CI/CD pipeline. CodePipeline is made out of 3 stages: Source, Build and Deploy. The source stage is cloning (not pulling) the source files from the GitHub repo, and therefore, the result of the source stage is not a repo (.git) but rather just a clone of the source files hierarchy. And this is the folder that the Build stage sees, and that's why the error takes place. Conversely, when I'm building on my development machine, there are no errors because the git repo exists in the hierarchy. To summarize, I think that building out of a git clone vs. a pull is a rather common use case. Perhaps the |
@metalmarker yep, in that case you should try to pass |
I can set the commit / repo fields, but the "fatal: not a git repository" error remains. Doesn't seem right to have a fatal error during build... |
Ah, i thought problem was solved:) Did you use |
Yes, I did, and it didn't resolve the error. |
I'm using AWS CodeBuild to build an express app configured with the plugin, I'm getting this error during build:
fatal: not a git repository (or any of the parent directories): .git
.Am I missing a specific configuration flag that I need to turn off?
The text was updated successfully, but these errors were encountered: