glab auth credential-helper not working with 1password integration
Problem
1password integration wraps glab in the shell with it's own wrapper.
That means that if another process directly executes the binary (e.g. Duo CLI calling credentials helper) the 1password credentials are not available.
How to reproduce
- have 1password integration set up
plain glab works
[N] ~/w/g/gitlab-lsp/glab-auth (tv/2026-02/glab-auth|✔) $ glab auth status
gitlab.com
✓ Logged in to gitlab.com as viktomas (GITLAB_TOKEN)
✓ Git operations for gitlab.com configured to use ssh protocol.
✓ API calls for gitlab.com are made over https protocol.
✓ REST API Endpoint: https://gitlab.com/api/v4/
✓ GraphQL Endpoint: https://gitlab.com/api/graphql/
✓ Token found: **************************
! One of GITLAB_TOKEN, GITLAB_ACCESS_TOKEN, OAUTH_TOKEN environment variables is set. It will be used for all authentication.
invoking the binary directly fails
[N] ~/w/g/gitlab-lsp/glab-auth (tv/2026-02/glab-auth|✔) $ /Users/tomas/.local/share/mise/installs/go/1.25.4/bin/glab auth status
gitlab.com
x gitlab.com: API call failed: GET https://gitlab.com/api/v4/user: 401 {message: 401 Unauthorized}
✓ Git operations for gitlab.com configured to use ssh protocol.
✓ API calls for gitlab.com are made over https protocol.
✓ REST API Endpoint: https://gitlab.com/api/v4/
✓ GraphQL Endpoint: https://gitlab.com/api/graphql/
! No token found (checked config file, keyring, and environment variables).
ERROR
could not authenticate to one or more of the configured GitLab instances..
Resoruces
Discovered in gitlab-org/editor-extensions/gitlab-lsp!2826 (comment 3083157526)