Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gitlab CI can't fetch repo because keep asking for keychain password

I have project on company Gitlab. Project is for iOS platform so my node for building project is Mac Mini with OS Sierra.

Runner works great - connecting etc works. But when I try to run pipeline I get message on node like on picture. This alert appear when gitlab runner wants to checkout code.

I checked in KeychainAccess that git-credential-osxkeychain app have access to password for gitlab on login keychain.

How to fix that and disable dialog for keychain password?

config.toml file:

concurrent = 1
check_interval = 0

[[runners]]
name = "Mac mini runner"
url = "URLtoMyGitLab"
token = "token"
executor = "shell"
[runners.cache]

git-credential-osxkeychain

like image 543
user2251650 Avatar asked Jan 12 '17 08:01

user2251650


People also ask

Where are GitLab passwords stored?

GitLab stores user passwords in a hashed format to prevent passwords from being stored as plain text. GitLab uses the Devise authentication library to hash user passwords. Created password hashes have these attributes: Hashing: The bcrypt hashing function is used to generate the hash of the provided password.

What is GitLab runner executor?

GitLab Runner implements a number of executors that can be used to run your build. It determines the environment each job runs in. For example, If I want CI/CD job to run PowerShell commands, I might install GitLab Runner on a server and then register a runner that uses the shell executor.


1 Answers

For me the solution for this was to configure git, to use keychain in the project root.

- git config --global credential.helper osxkeychain

along with unlocking the keychain in before_script:

- security unlock-keychain -p $PASSWORD /Users/[MASKED]/Library/Keychains/login.keychain-db
- security set-keychain-settings -t 3600 -l /Users/[MASKED]/Library/Keychains/login.keychain-db
like image 83
Webfreak Avatar answered Sep 26 '22 19:09

Webfreak