fatal: Not a git repository
See original GitHub issueI’m not sure why but I’m getting this error.
My build script is a bit long so copying and pasting it all of here seems uneeded.
name: Tests
on:
- push
- pull_request
jobs:
test:
runs-on: ubuntu-latest
container: node:10.18-jessie
strategy:
matrix:
dotnet-version:
- 2.1.x
services:
postgres:
image: postgis/postgis:10-2.5
env:
POSTGRES_PASSWORD: '111+++'
POSTGRES_DB: sigparser
POSTGRES_USER: postgres
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
...
steps:
- uses: actions/checkout@v2
- name: 'Setup .NET Core SDK ${{ matrix.dotnet-version }}'
uses: actions/setup-dotnet@v1.7.2
with:
dotnet-version: '${{ matrix.dotnet-version }}'
- name: Install dependencies
run: dotnet restore
- name: Run Migrations
run: >
dotnet run
--project ./DBUpgrader/DBUpgrader.csproj
-- migrate
--recreate true
--fillconfigkeytable true
--trycreateifnotexists true
- name: What directory are we in?
run: pwd
- name: Test
run: dotnet test --logger "trx;LogFileName=test-results.trx"
- name: Publish Unit Test Results
uses: dorny/test-reporter@v1.5.0
if: always()
with:
name: Test Results
path: ./**/TestResults/*.trx
reporter: 'dotnet-trx'
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Solving “Fatal: Not A Git Repository” (Or Any Of The Parent ...
This error means that you have some files that have been edited but not committed, and by checking out another branch, you'll overwrite...
Read more >Git error - Fatal: Not a git repository and how to fix it | Datree.io
This error means you attempted to run a Git command, but weren't inside a Git repository. Make sure you've: ... Usually, this is...
Read more >Not a git repository" when attempting to remote add a Git repo
Go to your source folder where local repo is stored , example mine is found in c:/GitSource , right click ...
Read more >How to Fix the “fatal: not a git repository” Error - ContainIQ
In short, the fatal: not a git repository error indicates that your current working directory isn't tracked by Git. If you find yourself...
Read more >fatal: not a git repository (or any of the parent directories): .git
The cause of this error message is running a Git command outside of a directory in which a Git folder is initialized. For...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi!
Can we have a flag to disable any usage of git? (eg: disableAnnotations: true)
The use case is: I have a job for deployment, where I only need build related artifacts. I run the tests after deployment on the given environment. Ideally I do not want to checkout the source code.
@dorny did you have a chance to added this flag? I am also struggeling to just have a workaround git repo on my report summary job. Since I am only checking out code in a build stage but hand over all artifacts over the pipeline. I am doing integration tests I shouldn’t need to checkout anything.