简体   繁体   中英

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM