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

Problem: Executing a task does not respect the global git config #2614

Open
NolanWelser opened this issue Dec 6, 2024 · 1 comment
Open

Comments

@NolanWelser
Copy link

Issue

I have configured git on the semaphore server to use a credential helper in the global config. This works for the cloning of a repository for inventory and a task template, but if a task attempts to clone a repository it will hang. After registering the output of "git config --list" and outputting it with debug, the globally set credential helper option is not included. Presumably, the task is hanging because git is asking for authentication but verbose options do yield any helpful output.

Impact

Ansible (task execution)

Installation method

Binary

Database

BoltDB

Browser

Chrome

Semaphore Version

2.10.43-e43af6b-1732277822

Ansible Version

core 2.17.5

Logs & errors

N/A

Manual installation - system information

Linux 6.8.0-48-generic #48-Ubuntu SMP PREEMPT_DYNAMIC Fri Sep 27 14:04:52 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux (Ubuntu 24.04.1 LTS)
Apache

Configuration

~$ git config --list
credential.helper=lastpass

Output of git config --list while executed in a task

"stdout_lines": [
            "core.repositoryformatversion=0",
            "core.filemode=true",
            "core.bare=false",
            "core.logallrefupdates=true",
            "submodule.active=.",
            "remote.origin.url=https://[REDACTED]",
            "remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*",
            "branch.develop.remote=origin",
            "branch.develop.merge=refs/heads/develop"
        ]

Additional information

No response

@OracleE3
Copy link

OracleE3 commented Jan 17, 2025

I'm having a similar issue, but with the "detected dubious ownership" fatal error, which is weird because I had added a global .gitconfig file for the semaphore user that was working until just now. I don't think it's a SSH credentials issue, because I'm cloning a repo from a file:// path. I'm running semaphore in a docker container and cloning from that file:// URL works if I exec into a bash shell in the container, but not when semaphore tries to run things.

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

No branches or pull requests

2 participants