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

Use glab cli config to import tokens #1523

Open
alexey-vostrikov opened this issue Mar 11, 2025 · 2 comments
Open

Use glab cli config to import tokens #1523

alexey-vostrikov opened this issue Mar 11, 2025 · 2 comments
Labels
feature Feature missing according to gitlab ci standard

Comments

@alexey-vostrikov
Copy link

~/.config/glab-cli/config.yml

is a config of gitlab.com/gitlab-org/cli tool
where tokens are stored
so if file exists and readable it can be used for gitlab-ci-local purposes

@firecow
Copy link
Owner

firecow commented Mar 12, 2025

Can you show here what the contents of such a file is? (Replace secrets with ****)

@firecow firecow added the feature Feature missing according to gitlab ci standard label Mar 12, 2025
@alexey-vostrikov
Copy link
Author

[avostrikov@bookt1 ~]$ cat ~/.config/glab-cli/config.yml

git_protocol: ssh
glamour_style: dark
check_update: false
display_hyperlinks: true
# configuration specific for gitlab instances
hosts:
    gitlab.some.organization:
        token: glpat-xxxxxxxxxxx
        api_host: gitlab.some.organization
        api_protocol: https
        user: someuser
    git.another.organization:
        token: glpat-yyyyyyyyyyy
        api_host: git.another.organization
        api_protocol: https
        git_protocol: https
        user: anotheruser
    prod-git.third.org:
        token: BlaHbLaHBlahblaHblaH
        api_host: prod-git.third.org
        api_protocol: https
        git_protocol: https
        user: thirduser
    gitlab.com:
        is_oauth2: "true"
        oauth2_refresh_token: e5249a66059fbb8c81b1eb8cafd81d6c8d99dd0234d1e866411bdc3b0a754fd
        oauth2_expiry_date: 12 Mar 25 17:05 UTC
        token: 2429ac7d970f7c43cd758f2e1552a35b725da1bd2e5b66c7d0b49657602d5f0f
        oauth2_code_verifier: ""
        api_host: gitlab.com
        git_protocol: https
        api_protocol: https
        user: publicuser
last_update_check_timestamp: "2025-02-19T17:10:54+03:00"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Feature missing according to gitlab ci standard
Projects
None yet
Development

No branches or pull requests

2 participants