Skip to content

Git config not found for centos:7 #1465

Closed as not planned
Closed as not planned
@DifferentialOrange

Description

@DifferentialOrange

Describe the bug

Action fails to work in centos:7 container due to git config issues.

Reproduction Steps

Run action for a private repo inside the basic centos:7 container.

Logs

##[debug]Evaluating condition for step: 'Run actions/checkout@v3'
##[debug]Evaluating: success()
##[debug]Evaluating success:
##[debug]=> true
##[debug]Result: true
##[debug]Starting: Run actions/checkout@v3
##[debug]Register post job cleanup for action: actions/checkout@v3
##[debug]Loading inputs
##[debug]Evaluating: github.repository
##[debug]Evaluating Index:
##[debug]..Evaluating github:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'repository'
##[debug]=> 'myorg/mymodule'
##[debug]Result: 'myorg/mymodule'
##[debug]Evaluating: github.token
##[debug]Evaluating Index:
##[debug]..Evaluating github:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'token'
##[debug]=> '***'
##[debug]Result: '***'
##[debug]Loading env
Run actions/checkout@v3
  with:
    repository: myorg/mymodule
    token: ***
    ssh-strict: true
    persist-credentials: true
    clean: true
    sparse-checkout-cone-mode: true
    fetch-depth: 1
    fetch-tags: false
    lfs: false
    submodules: false
    set-safe-directory: true
  env:
    ROCK_NAME: mymodule
/usr/bin/docker exec  f85c2259b5f057b866180071fa30559e3f51380a70d22e50a4f3e9393ebcc7ee sh -c "cat /etc/*release | grep ^ID"
##[debug]ID="centos"
##[debug]ID_LIKE="rhel fedora"
##[debug]Running JavaScript Action with default external tool: node16
##[debug]GITHUB_WORKSPACE = '/__w/mymodule/mymodule'
##[debug]qualified repository = 'myorg/mymodule'
##[debug]ref = 'refs/heads/master'
##[debug]commit = '57d44cb8772ce1d5e92b8c0d08232a49c988f6fd'
##[debug]clean = true
##[debug]fetch depth = 1
##[debug]fetch tags = false
##[debug]lfs = false
##[debug]submodules = false
##[debug]recursive submodules = false
##[debug]GitHub Host URL = 
::add-matcher::/__w/_actions/actions/checkout/v3/dist/problem-matcher.json
##[debug]Added matchers: 'checkout-git'. Problem matchers scan action output for known warning or error strings and report these inline.
Syncing repository: myorg/mymodule
::group::Getting Git version info
Getting Git version info
  Working directory is '/__w/mymodule/mymodule'
  ##[debug]Getting git version
  /usr/bin/git version
  git version 1.8.3.1
  ##[debug]0
  ##[debug]git version 1.8.3.1
  ##[debug]
  ::endgroup::
Deleting the contents of '/__w/mymodule/mymodule'
The repository will be downloaded using the GitHub REST API
To create a local Git repository instead, add Git 2.18 or higher to the PATH
Downloading the archive
Writing archive to disk
Extracting the archive
/usr/bin/tar xz -C /__w/mymodule/mymodule/bda5dfe1-3b08-4b62-9308-7a11ec64b240 -f /__w/mymodule/mymodule/bda5dfe1-3b08-4b62-9308-7a11ec64b240.tar.gz
Resolved version myorg-mymodule-57d44cb8772ce1d5e92b8c0d08232a49c988f6fd
::remove-matcher owner=checkout-git::
##[debug]Removed matchers: 'checkout-git'
##[debug]Node Action run completed with exit code 0
##[debug]Save intra-action state isPost = true
##[debug]Finishing: Run actions/checkout@v3

##[debug]Evaluating condition for step: 'Publish generated API documentation to GitHub Pages'
##[debug]Evaluating: success()
##[debug]Evaluating success:
##[debug]=> true
##[debug]Result: true
##[debug]Starting: Publish generated API documentation to GitHub Pages
##[debug]Loading inputs
##[debug]Evaluating: github.token
##[debug]Evaluating Index:
##[debug]..Evaluating github:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'token'
##[debug]=> '***'
##[debug]Result: '***'
##[debug]Loading env
Run JamesIves/github-pages-deploy-action@v4.4.1
  with:
    branch: gh-pages
    folder: doc/apidoc
    token: ***
    clean: true
    force: true
  env:
    ROCK_NAME: mymodule
/usr/bin/docker exec  f85c2259b5f057b866180071fa30559e3f51380a70d22e50a4f3e9393ebcc7ee sh -c "cat /etc/*release | grep ^ID"
##[debug]ID="centos"
##[debug]ID_LIKE="rhel fedora"
##[debug]Running JavaScript Action with default external tool: node16

    ╭━━━╮╭╮╭╮╱╭╮╱╱╭╮╱╱╭━━━╮
    ┃╭━╮┣╯╰┫┃╱┃┃╱╱┃┃╱╱┃╭━╮┃
    ┃┃╱╰╋╮╭┫╰━╯┣╮╭┫╰━╮┃╰━╯┣━━┳━━┳━━┳━━╮
    ┃┃╭━╋┫┃┃╭━╮┃┃┃┃╭╮┃┃╭━━┫╭╮┃╭╮┃┃━┫━━┫
    ┃╰┻━┃┃╰┫┃╱┃┃╰╯┃╰╯┃┃┃╱╱┃╭╮┃╰╯┃┃━╋━━┃
    ╰━━━┻┻━┻╯╱╰┻━━┻━━╯╰╯╱╱╰╯╰┻━╮┣━━┻━━╯
    ╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╭━╯┃
    ╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╰━━╯
    ╭━━━╮╱╱╱╱╱╭╮╱╱╱╱╱╱╱╱╭━━━╮╱╱╭╮
    ╰╮╭╮┃╱╱╱╱╱┃┃╱╱╱╱╱╱╱╱┃╭━╮┃╱╭╯╰╮
    ╱┃┃┃┣━━┳━━┫┃╭━━┳╮╱╭╮┃┃╱┃┣━┻╮╭╋┳━━┳━╮
    ╱┃┃┃┃┃━┫╭╮┃┃┃╭╮┃┃╱┃┃┃╰━╯┃╭━┫┃┣┫╭╮┃╭╮╮
    ╭╯╰╯┃┃━┫╰╯┃╰┫╰╯┃╰━╯┃┃╭━╮┃╰━┫╰┫┃╰╯┃┃┃┃
    ╰━━━┻━━┫╭━┻━┻━━┻━╮╭╯╰╯╱╰┻━━┻━┻┻━━┻╯╰╯
    ╱╱╱╱╱╱╱┃┃╱╱╱╱╱╱╭━╯┃
    ╱╱╱╱╱╱╱╰╯╱╱╱╱╱╱╰━━╯
    

    💖 Support: https://github.com/sponsors/JamesIves
    📣 Maintained by James Ives: https://jamesiv.es

    🚀 Getting Started Guide: https://github.com/JamesIves/github-pages-deploy-action
    ❓ Discussions / Q&A: https://github.com/JamesIves/github-pages-deploy-action/discussions
    🔧 Report a Bug: https://github.com/JamesIves/github-pages-deploy-action/issues
Checking configuration and starting deployment… 🚦
Deploying using Deploy Token… 🔑
Configuring git…
/usr/bin/git config --global --add safe.directory /__w/mymodule/mymodule
/usr/bin/git config user.name DifferentialOrange
error: could not lock config file .git/config: No such file or directory
Error: There was an error initializing the repository: The process '/usr/bin/git' failed with exit code 255 ❌
Notice: Deployment failed! ❌
##[debug]Node Action run completed with exit code 1
##[debug]deployment_status='failed'
##[debug]Set output deployment-status = failed
##[debug]Finishing: Publish generated API documentation to GitHub Pages

Workflow

push-apidoc:
    runs-on: [self-hosted, Linux, x86_64, regular]
    container:
      image: centos:7

    steps:
      - name: Prepare the container
        run: yum install -y \
          autoconf \
          automake \
          build-essential \
          make \
          which \
          curl \
          gcc \
          gcc-c++ \
          git \
          libtool \
          rsync \
          sudo \
          tzdata \
          unzip \
          wget \
          binutils-devel \
          glibc-static \
          perl-IPC-Cmd |
          git

      - uses: actions/checkout@v3 # cannot use newer due to missing node20 support

      - name: Build API documentation
        run: make docs

      - name: Publish generated API documentation to GitHub Pages
        uses: JamesIves/github-pages-deploy-action@v4.4.1
        with:
          branch: gh-pages
          folder: doc/apidoc

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions