Managing http credentials in Linux CLI


I need to connect to a remote GitLab server behind a firewall. I only have access to the HTTPS protocol.
I am working on a headless Linux CentOS 7 server.
I can connect interactively to the server and configure a credential.helper cache to keep them for the session.

I wanted also some automated jobs to run. Since I cannot ensure the credential helper daemon is there, I would like to find something else than cache option.

EDIT: .netrc is working fine, but is hard to setup with gpg for some users.

Is there a way to use a different persistent caching system which wil not leave the password in clear ?

I may have missed a trivial solution, but I am currently in an end.

Thanks for your help

Hi there,

It is not really clear what you try to archive, sorry!

Probably you should use a access token which can be defined for an account in User Settings / Personal Access Tokens. Protect the script or what ever with according permissions chmod 700 for instance.

Good luck!

I think it will not fit.
If I want a script to automatically push to a repository, Personal Access Tokens will not have this access level.

Windows has the new Github Windows git credential manager, which stores user and password in a vault that can be reused by the user from command line.
I would like to have a similar piece on Linux, like a keyring or a wallet, but usable by git from command line