[GH-ISSUE #2465] How do I override and set a private github server? #1140

Closed
opened 2026-03-01 21:49:12 +03:00 by kerem · 1 comment
Owner

Originally created by @kingrichard2005 on GitHub (Sep 18, 2024).
Original GitHub issue: https://github.com/nektos/act/issues/2465

Bug report info

act version:            0.2.67
GOOS:                   windows
GOARCH:                 amd64
NumCPU:                 4
Docker host:            DOCKER_HOST environment variable is not set
Sockets found:
        \\.\pipe\docker_engine(broken)
Config files:
        C:\Users\myfolder\.actrc:
                -P ubuntu-latest=catthehacker/ubuntu:act-latest
                -P ubuntu-22.04=catthehacker/ubuntu:act-22.04
                -P ubuntu-20.04=catthehacker/ubuntu:act-20.04
                -P ubuntu-18.04=catthehacker/ubuntu:act-18.04
Build info:
        Go version:            go1.21.13
        Module path:           github.com/nektos/act
        Main version:          (devel)
        Main path:             github.com/nektos/act
        Main checksum:
        Build settings:
                -buildmode:           exe
                -compiler:            gc
                -ldflags:             -s -w -X main.version=0.2.67 -X main.commit=f75a2d8b38cc3b929ab652c0994d6d33f6584ed9 -X main.date=2024-09-10T18:17:24Z -X main.builtBy=goreleaser
                CGO_ENABLED:          0
                GOARCH:               amd64
                GOOS:                 windows
                GOAMD64:              v1
                vcs:                  git
                vcs.revision:         f75a2d8b38cc3b929ab652c0994d6d33f6584ed9
                vcs.time:             2024-09-10T18:17:07Z
                vcs.modified:         false
Docker Engine:
        Engine version:        20.10.21
        Engine runtime:        runc
        Cgroup version:        1
        Cgroup driver:         cgroupfs
        Storage driver:        overlay2
        Registry URI:          https://index.docker.io/v1/
        OS:                    Rancher Desktop WSL Distribution
        OS type:               linux
        OS version:            0.34
        OS arch:               x86_64
        OS kernel:             5.15.153.1-microsoft-standard-WSL2
        OS CPU:                4
        OS memory:             5930 MB
        Security options:
                name=seccomp,profile=default

Command used with act

act -s GITHUB_TOKEN="$(gh auth token)" --secret-file ./github_action_test.secrets -j lint -P self-hosted=catthehacker/ubuntu:act-20.04

Describe issue

I'm using act version 0.2.67, I have a workflow that uses a private Github Enterprise server to host my custom GHA actions, e.g. https://git.my-org.com/myteam/gha-setup-node. The problem is when I run the command it looks at the public https://github.com instead of my private Github enterprise server https://git.my-org.com. Why does that happen? And how can we fix it? I'm also not sure why it says the "Job succeeded" then subsequently reports the error due to the repo not being found. Help is appreciated

[my-api-ci/install-packages] Unable to clone https://github.com/myteam/gha-setup-node refs/heads/v1: repository not found
[myapi-ci/install-packages] Cleaning up container for job install-packages
[my-api-ci/install-packages] � Job succeeded
Error: repository not found

No response

Workflow content

name: my-api-ci
on:
  workflow_dispatch:
    inputs:
      deployDockerImageJob:
        description: "Deploy Docker Image"
        required: false
        type: boolean
      deployHelmChartJob:
        description: "Deploy Helm Chart"
        required: false
        type: boolean
      runIntTests:
        description: "Run Integration Tests"
        required: false
        type: boolean
  push:
  pull_request:
    types:
      - edited
      - opened
      - synchronize
concurrency:
  group: my-api-ci-${{ github.ref_name }}
  cancel-in-progress: true
jobs:
  install-packages:
    runs-on: [self-hosted, linux]
    steps:
      - name: Checkout repo
        uses: actions/checkout@v3
      - name: Setup node env
        uses: myteam/gha-setup-node@v1
        with:
          node-version: 18.20.4
          cache-dependency-path: |
            ./yarn.lock
      - name: Install dependencies
        run: yarn install --frozen-lockfile

Relevant log output

[my-api-ci/install-packages] Unable to clone https://github.com/myteamrepo/gha-setup-node refs/heads/v1: repository not found
[my-api-ci/install-packages] Cleaning up container for job install-packages
[my-api-ci/install-packages] �  Job succeeded
Error: repository not found

Additional information

No response

Originally created by @kingrichard2005 on GitHub (Sep 18, 2024). Original GitHub issue: https://github.com/nektos/act/issues/2465 ### Bug report info ```plain text act version: 0.2.67 GOOS: windows GOARCH: amd64 NumCPU: 4 Docker host: DOCKER_HOST environment variable is not set Sockets found: \\.\pipe\docker_engine(broken) Config files: C:\Users\myfolder\.actrc: -P ubuntu-latest=catthehacker/ubuntu:act-latest -P ubuntu-22.04=catthehacker/ubuntu:act-22.04 -P ubuntu-20.04=catthehacker/ubuntu:act-20.04 -P ubuntu-18.04=catthehacker/ubuntu:act-18.04 Build info: Go version: go1.21.13 Module path: github.com/nektos/act Main version: (devel) Main path: github.com/nektos/act Main checksum: Build settings: -buildmode: exe -compiler: gc -ldflags: -s -w -X main.version=0.2.67 -X main.commit=f75a2d8b38cc3b929ab652c0994d6d33f6584ed9 -X main.date=2024-09-10T18:17:24Z -X main.builtBy=goreleaser CGO_ENABLED: 0 GOARCH: amd64 GOOS: windows GOAMD64: v1 vcs: git vcs.revision: f75a2d8b38cc3b929ab652c0994d6d33f6584ed9 vcs.time: 2024-09-10T18:17:07Z vcs.modified: false Docker Engine: Engine version: 20.10.21 Engine runtime: runc Cgroup version: 1 Cgroup driver: cgroupfs Storage driver: overlay2 Registry URI: https://index.docker.io/v1/ OS: Rancher Desktop WSL Distribution OS type: linux OS version: 0.34 OS arch: x86_64 OS kernel: 5.15.153.1-microsoft-standard-WSL2 OS CPU: 4 OS memory: 5930 MB Security options: name=seccomp,profile=default ``` ### Command used with act ```sh act -s GITHUB_TOKEN="$(gh auth token)" --secret-file ./github_action_test.secrets -j lint -P self-hosted=catthehacker/ubuntu:act-20.04 ``` ### Describe issue I'm using act version 0.2.67, I have a workflow that uses a private Github Enterprise server to host my custom GHA actions, e.g. https://git.my-org.com/myteam/gha-setup-node. The problem is when I run the command it looks at the public https://github.com instead of my private Github enterprise server https://git.my-org.com. Why does that happen? And how can we fix it? I'm also not sure why it says the "Job succeeded" then subsequently reports the error due to the repo not being found. Help is appreciated [my-api-ci/install-packages] Unable to clone https://github.com/myteam/gha-setup-node refs/heads/v1: repository not found [myapi-ci/install-packages] Cleaning up container for job install-packages [my-api-ci/install-packages] � Job succeeded Error: repository not found ### Link to GitHub repository _No response_ ### Workflow content ```yml name: my-api-ci on: workflow_dispatch: inputs: deployDockerImageJob: description: "Deploy Docker Image" required: false type: boolean deployHelmChartJob: description: "Deploy Helm Chart" required: false type: boolean runIntTests: description: "Run Integration Tests" required: false type: boolean push: pull_request: types: - edited - opened - synchronize concurrency: group: my-api-ci-${{ github.ref_name }} cancel-in-progress: true jobs: install-packages: runs-on: [self-hosted, linux] steps: - name: Checkout repo uses: actions/checkout@v3 - name: Setup node env uses: myteam/gha-setup-node@v1 with: node-version: 18.20.4 cache-dependency-path: | ./yarn.lock - name: Install dependencies run: yarn install --frozen-lockfile ``` ### Relevant log output ```sh [my-api-ci/install-packages] Unable to clone https://github.com/myteamrepo/gha-setup-node refs/heads/v1: repository not found [my-api-ci/install-packages] Cleaning up container for job install-packages [my-api-ci/install-packages] � Job succeeded Error: repository not found ``` ### Additional information _No response_
kerem 2026-03-01 21:49:12 +03:00
  • closed this issue
  • added the
    kind/bug
    label
Author
Owner

@kingrichard2005 commented on GitHub (Sep 18, 2024):

For anyone else with the same issue, I tested out some more and turns out I had to update my .actrc file to add --github-instance git.my-org.com.

What threw me off was that this was not an issue with older versions of act and was the first time I'd encountered this specific issue so I didn't consider that missing config in my .actrc to be the issue, but hopefully this helps anyone else who runs into this same configuration issue. Here is a snippet of the output from rerunning after making this update

[products-api-ci/install-packages]   ☁  git clone 'https://git.my-org.com/ows/gha-setup-node' # ref=v1
[products-api-ci/install-packages] ⭐ Run Pre Setup node env
[products-api-ci/install-packages]   ☁  git clone 'https://git.my-org.com/actions/setup-node' # ref=v3
[products-api-ci/install-packages]   ✅  Success - Pre Setup node env
[products-api-ci/install-packages] ⭐ Run Main Checkout repo
[products-api-ci/install-packages]   �  docker cp src=C:\srcs\33\my-api\. dst=/mnt/c/srcs/33/my-api
[products-api-ci/install-packages]   ✅  Success - Main Checkout repo
[products-api-ci/install-packages] ⭐ Run Main Setup node env
[products-api-ci/install-packages]   �  docker cp src=C:\Users\me\.cache\act/ows-gha-setup-node@v1/ dst=/var/run/act/actions/ows-gha-setup-node@v1/
[products-api-ci/install-packages] ⭐ Run Main Install yarn
[products-api-ci/install-packages]   �  docker exec cmd=[bash --noprofile --norc -e -o pipefail /var/run/act/workflow/1-composite-0.sh] user= workdir=
[products-api-ci/install-packages]   ✅  Success - Main Install yarn
[products-api-ci/install-packages]   ⚙  ::add-path:: /root/bin
<!-- gh-comment-id:2359104770 --> @kingrichard2005 commented on GitHub (Sep 18, 2024): For anyone else with the same issue, I tested out some more and turns out I had to update my `.actrc` file to add `--github-instance git.my-org.com`. What threw me off was that this was not an issue with older versions of `act` and was the first time I'd encountered this specific issue so I didn't consider that missing config in my `.actrc` to be the issue, but hopefully this helps anyone else who runs into this same configuration issue. Here is a snippet of the output from rerunning after making this update ``` [products-api-ci/install-packages] ☁ git clone 'https://git.my-org.com/ows/gha-setup-node' # ref=v1 [products-api-ci/install-packages] ⭐ Run Pre Setup node env [products-api-ci/install-packages] ☁ git clone 'https://git.my-org.com/actions/setup-node' # ref=v3 [products-api-ci/install-packages] ✅ Success - Pre Setup node env [products-api-ci/install-packages] ⭐ Run Main Checkout repo [products-api-ci/install-packages] � docker cp src=C:\srcs\33\my-api\. dst=/mnt/c/srcs/33/my-api [products-api-ci/install-packages] ✅ Success - Main Checkout repo [products-api-ci/install-packages] ⭐ Run Main Setup node env [products-api-ci/install-packages] � docker cp src=C:\Users\me\.cache\act/ows-gha-setup-node@v1/ dst=/var/run/act/actions/ows-gha-setup-node@v1/ [products-api-ci/install-packages] ⭐ Run Main Install yarn [products-api-ci/install-packages] � docker exec cmd=[bash --noprofile --norc -e -o pipefail /var/run/act/workflow/1-composite-0.sh] user= workdir= [products-api-ci/install-packages] ✅ Success - Main Install yarn [products-api-ci/install-packages] ⚙ ::add-path:: /root/bin ```
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#1140
No description provided.