Skip to content
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

[BUG]: GitVersion doesn't work from non-root user in linux #4182

Open
2 tasks done
meandrii opened this issue Aug 27, 2024 · 1 comment
Open
2 tasks done

[BUG]: GitVersion doesn't work from non-root user in linux #4182

meandrii opened this issue Aug 27, 2024 · 1 comment

Comments

@meandrii
Copy link

meandrii commented Aug 27, 2024

Prerequisites

  • I have written a descriptive issue title
  • I have searched issues to ensure it has not already been reported

GitVersion package

GitHub Release

GitVersion version

2.4.3

Operating system

Linux

What are you seeing?

user@location:~$ gitversion
Failed to map file. open(/usr/bin/gitversion) failed with error 13
Failure processing application bundle.
Couldn't memory map the bundle file for reading.
A fatal error occurred while processing application bundle

What is expected?

user@localhost:~$ gitversion
Cannot find the .git directory

Steps to Reproduce

  1. install gitversion from sudo account
    GITVERSION_VER="6.0.2"
    cd tmp && wget -q
    https://github.com/GitTools/GitVersion/releases/download/${GITVERSION_VER}/gitversion-linux-x64-${GITVERSION_VER}.tar.gz
    && tar -xzvf gitversion-linux-x64-${GITVERSION_VER}.tar.gz
    && chmod +x gitversion
    && sudo cp gitversion /usr/bin
    && rm -rf gitversion-linux-x64-${GITVERSION_VER}.tar.gz
  2. try to run without sudo

RepositoryFixture Test

No response

Output log or link to your CI build (if appropriate).

No response

@nfstein
Copy link

nfstein commented Oct 9, 2024

I am hitting this as well with gitversion 6.0.2 on a redhat enterprise linux 8 machine
edit: I was able to resolve by adding read permissions sudo chmod +rx <path-to-gitversion>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants