[GH-ISSUE #1242] unable to get git repo #684

Closed
opened 2026-03-01 21:45:29 +03:00 by kerem · 6 comments
Owner

Originally created by @mrcnski on GitHub (Jul 5, 2022).
Original GitHub issue: https://github.com/nektos/act/issues/1242

Bug report info

act version:            0.2.29
GOOS:                   darwin
GOARCH:                 amd64
NumCPU:                 16
Docker host:            DOCKER_HOST environment variable is unset/empty.
Sockets found:
	/var/run/docker.sock
Config files:           
	/Users/marcin/.actrc:
		-P ubuntu-latest=ghcr.io/catthehacker/ubuntu:act-latest
		-P ubuntu-22.04=ghcr.io/catthehacker/ubuntu:act-22.04
		-P ubuntu-20.04=ghcr.io/catthehacker/ubuntu:act-20.04
		-P ubuntu-18.04=ghcr.io/catthehacker/ubuntu:act-18.04
Build info:
	Go version:            go1.18.3
	Module path:           command-line-arguments
	Main version:          
	Main path:             
	Main checksum:         
	Build settings:
		-compiler:            gc
		-ldflags:             -X main.version=0.2.29
		CGO_ENABLED:          1
		CGO_CFLAGS:           
		CGO_CPPFLAGS:         
		CGO_CXXFLAGS:         
		CGO_LDFLAGS:          
		GOARCH:               amd64
		GOOS:                 darwin
		GOAMD64:              v1
Docker Engine:
	Engine version:        20.10.10
	Engine runtime:        runc
	Cgroup version:        1
	Cgroup driver:         cgroupfs
	Storage driver:        overlay2
	Registry URI:          https://index.docker.io/v1/
	OS:                    Docker Desktop
	OS type:               linux
	OS version:            
	OS arch:               x86_64
	OS kernel:             5.10.47-linuxkit
	OS CPU:                4
	OS memory:             1985 MB
	Security options:
		name=seccomp,profile=default

Command used with act

act

Describe issue

Tons and tons of error message spam in the output.

https://github.com/SkynetLabs/skynet-js

Workflow content

name: "CI"

on:
  push:
    branches: [master]
  pull_request:

# For auto-approving/merging PRs.
permissions:
  pull-requests: write
  contents: write

jobs:
  check:
    name: "Checks and Tests"
    runs-on: ubuntu-latest

    strategy:
      fail-fast: false
      matrix:
        portal: ["siasky.net", "skynetfree.net", "skynetpro.net"]
        node-version: [14.x, 16.x, 18.x]

    steps:
      - name: "Run Yarn Basic Checks"
        # This is needed because PRs from forks do not have access to secrets.
        #
        # TODO: We can change this to always run siasky later, but right now this portal
        #       is too unstable.
        if: "!github.event.pull_request.head.repo.fork || matrix.portal != 'siasky.net'"
        uses: SkynetLabs/.github/.github/actions/yarn-basic-checks@master
        with:
          node-version: ${{ matrix.node-version }}
          build: true
        env:
          SKYNET_JS_INTEGRATION_TEST_SERVER: "https://${{ matrix.portal }}"
          SKYNET_JS_INTEGRATION_TEST_SKYNET_API_KEY: ${{ secrets.SKYNET_API_KEY }}

  # Auto-merge Dependabot PRs. Requires also `.github/.kodiak.toml`.
  # See https://hackmd.io/@SkynetLabs/ryFfInNXc.
  dependabot:
    name: "Approve and Merge Dependabot PRs"
    # - Must be a PR.
    # - The latest actor must be Dependabot. This prevents other users from
    #   sneaking in changes into the PR.
    if: ${{ github.event_name == 'pull_request' && github.actor == 'dependabot[bot]' }}
    runs-on: ubuntu-latest

    steps:
      - name: "Run Auto-Approval and Auto-Merge"
        uses: SkynetLabs/.github/.github/actions/dependabot-approve-and-merge@master
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}

Relevant log output

[CI/Checks and Tests-6              ] unable to get git repo: unable to find git repo
[CI/Checks and Tests-6              ] unable to get git ref: unable to find git repo
[CI/Checks and Tests-6              ] unable to get git revision: unable to find git repo
[CI/Checks and Tests-6              ] unable to get git repo: unable to find git repo
[CI/Checks and Tests-6              ] unable to get git ref: unable to find git repo
[CI/Checks and Tests-6              ] unable to get git revision: unable to find git repo
[CI/Checks and Tests-6              ] unable to get git repo: unable to find git repo
[CI/Checks and Tests-6              ] unable to get git ref: unable to find git repo

etc.



### Additional information

_No response_
Originally created by @mrcnski on GitHub (Jul 5, 2022). Original GitHub issue: https://github.com/nektos/act/issues/1242 ### Bug report info ```plain text act version: 0.2.29 GOOS: darwin GOARCH: amd64 NumCPU: 16 Docker host: DOCKER_HOST environment variable is unset/empty. Sockets found: /var/run/docker.sock Config files: /Users/marcin/.actrc: -P ubuntu-latest=ghcr.io/catthehacker/ubuntu:act-latest -P ubuntu-22.04=ghcr.io/catthehacker/ubuntu:act-22.04 -P ubuntu-20.04=ghcr.io/catthehacker/ubuntu:act-20.04 -P ubuntu-18.04=ghcr.io/catthehacker/ubuntu:act-18.04 Build info: Go version: go1.18.3 Module path: command-line-arguments Main version: Main path: Main checksum: Build settings: -compiler: gc -ldflags: -X main.version=0.2.29 CGO_ENABLED: 1 CGO_CFLAGS: CGO_CPPFLAGS: CGO_CXXFLAGS: CGO_LDFLAGS: GOARCH: amd64 GOOS: darwin GOAMD64: v1 Docker Engine: Engine version: 20.10.10 Engine runtime: runc Cgroup version: 1 Cgroup driver: cgroupfs Storage driver: overlay2 Registry URI: https://index.docker.io/v1/ OS: Docker Desktop OS type: linux OS version: OS arch: x86_64 OS kernel: 5.10.47-linuxkit OS CPU: 4 OS memory: 1985 MB Security options: name=seccomp,profile=default ``` ### Command used with act ```sh act ``` ### Describe issue Tons and tons of error message spam in the output. ### Link to GitHub repository https://github.com/SkynetLabs/skynet-js ### Workflow content ```yml name: "CI" on: push: branches: [master] pull_request: # For auto-approving/merging PRs. permissions: pull-requests: write contents: write jobs: check: name: "Checks and Tests" runs-on: ubuntu-latest strategy: fail-fast: false matrix: portal: ["siasky.net", "skynetfree.net", "skynetpro.net"] node-version: [14.x, 16.x, 18.x] steps: - name: "Run Yarn Basic Checks" # This is needed because PRs from forks do not have access to secrets. # # TODO: We can change this to always run siasky later, but right now this portal # is too unstable. if: "!github.event.pull_request.head.repo.fork || matrix.portal != 'siasky.net'" uses: SkynetLabs/.github/.github/actions/yarn-basic-checks@master with: node-version: ${{ matrix.node-version }} build: true env: SKYNET_JS_INTEGRATION_TEST_SERVER: "https://${{ matrix.portal }}" SKYNET_JS_INTEGRATION_TEST_SKYNET_API_KEY: ${{ secrets.SKYNET_API_KEY }} # Auto-merge Dependabot PRs. Requires also `.github/.kodiak.toml`. # See https://hackmd.io/@SkynetLabs/ryFfInNXc. dependabot: name: "Approve and Merge Dependabot PRs" # - Must be a PR. # - The latest actor must be Dependabot. This prevents other users from # sneaking in changes into the PR. if: ${{ github.event_name == 'pull_request' && github.actor == 'dependabot[bot]' }} runs-on: ubuntu-latest steps: - name: "Run Auto-Approval and Auto-Merge" uses: SkynetLabs/.github/.github/actions/dependabot-approve-and-merge@master with: github-token: ${{ secrets.GITHUB_TOKEN }} ``` ### Relevant log output ```sh [CI/Checks and Tests-6 ] unable to get git repo: unable to find git repo [CI/Checks and Tests-6 ] unable to get git ref: unable to find git repo [CI/Checks and Tests-6 ] unable to get git revision: unable to find git repo [CI/Checks and Tests-6 ] unable to get git repo: unable to find git repo [CI/Checks and Tests-6 ] unable to get git ref: unable to find git repo [CI/Checks and Tests-6 ] unable to get git revision: unable to find git repo [CI/Checks and Tests-6 ] unable to get git repo: unable to find git repo [CI/Checks and Tests-6 ] unable to get git ref: unable to find git repo ``` etc. ``` ### Additional information _No response_
kerem 2026-03-01 21:45:29 +03:00
  • closed this issue
  • added the
    kind/bug
    label
Author
Owner

@ZauberNerd commented on GitHub (Jul 5, 2022):

That's probably because you're executing act in a folder that doesn't contain a .git folder: https://github.com/nektos/act/blob/master/pkg/common/git/git.go#L226-L249

Also, these messages are warnings, not errors.

<!-- gh-comment-id:1174989263 --> @ZauberNerd commented on GitHub (Jul 5, 2022): That's probably because you're executing act in a folder that doesn't contain a `.git` folder: https://github.com/nektos/act/blob/master/pkg/common/git/git.go#L226-L249 Also, these messages are warnings, not errors.
Author
Owner

@mrcnski commented on GitHub (Jul 5, 2022):

There is a .git file (not folder), my repo happens to be a worktree. That seems to be what's causing it, based on the linked code.

This might be easily fixed if you use the gitdir specified in the worktree file, though you'd have to test it. I can even give it a shot if you reopen the issue.

<!-- gh-comment-id:1174996081 --> @mrcnski commented on GitHub (Jul 5, 2022): There is a `.git` file (not folder), my repo happens to be a worktree. That seems to be what's causing it, based on the linked code. This might be easily fixed if you use the `gitdir` specified in the worktree file, though you'd have to test it. I can even give it a shot if you reopen the issue.
Author
Owner

@ZauberNerd commented on GitHub (Jul 5, 2022):

There was an attempt a few months ago to implement worktree support in act: https://github.com/nektos/act/pull/829 but unfortunately it was abandoned.

If you want to try to implement it, please go ahead :)

<!-- gh-comment-id:1174999621 --> @ZauberNerd commented on GitHub (Jul 5, 2022): There was an attempt a few months ago to implement worktree support in act: https://github.com/nektos/act/pull/829 but unfortunately it was abandoned. If you want to try to implement it, please go ahead :)
Author
Owner

@mrcnski commented on GitHub (Jul 5, 2022):

There was an attempt a few months ago to implement worktree support in act: #829 but unfortunately it was abandoned.

If you want to try to implement it, please go ahead :)

I guess it's not as simple as just changing that one function:

But it will still not work with the current implementation, as act is working on the root working copy.
That need to be changed in this PR.

I don't have the inclination to dive into act internals; I barely use it, I just wanted to report a single issue.

It would be nice if at least the git error only displayed once instead of 1000s of times, but I likewise don't care to learn how act implements its error handling in order to fix that.

<!-- gh-comment-id:1175024151 --> @mrcnski commented on GitHub (Jul 5, 2022): > There was an attempt a few months ago to implement worktree support in act: #829 but unfortunately it was abandoned. > > If you want to try to implement it, please go ahead :) I guess it's not as simple as just changing that one function: > But it will still not work with the current implementation, as act is working on the root working copy. That need to be changed in this PR. I don't have the inclination to dive into `act` internals; I barely use it, I just wanted to report a single issue. It would be nice if at least the `git` error only displayed once instead of 1000s of times, but I likewise don't care to learn how `act` implements its error handling in order to fix that.
Author
Owner

@KnisterPeter commented on GitHub (Jul 5, 2022):

but I likewise don't care to learn how act implements its error handling in order to fix that

If you don't care, you don't deserve the fix 😉
Just joking.

<!-- gh-comment-id:1175026968 --> @KnisterPeter commented on GitHub (Jul 5, 2022): > but I likewise don't care to learn how act implements its error handling in order to fix that If you don't care, you don't deserve the fix :wink: Just joking.
Author
Owner

@mrcnski commented on GitHub (Jul 5, 2022):

but I likewise don't care to learn how act implements its error handling in order to fix that

If you don't care, you don't deserve the fix 😉 Just joking.

The maintainers could fix this really quickly as they already are familiar with the codebase.

<!-- gh-comment-id:1175032529 --> @mrcnski commented on GitHub (Jul 5, 2022): > > but I likewise don't care to learn how act implements its error handling in order to fix that > > If you don't care, you don't deserve the fix 😉 Just joking. The maintainers could fix this really quickly as they already are familiar with the codebase.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/act#684
No description provided.