Skip to content

cant login from vps #404

Open
Open

Description

@kufupa

http://127.0.0.1:9191/callback?code=HIDDENCODE&state=631fc273dc417b8408bf360372c827593e2863c2442cb2b74f1ec5bd3507e727&utm_campaign=cli-auth&utm_medium=cli&utm_source=githits-cli

couldn't login on my vps, got the

"Opening browser for GitHits sign-in...

If the browser did not open, open this URL:"

copied link to my laptop, saw website + clicked connect, then it redirected to a local 127 url and doesnt sign in on terminal on VPS.

Activity

  1. skvark commented on Sep 18, 2026

    @skvark
    Member

    The redirect to 127.0.0.1 points to your laptop, but GitHits is waiting for the callback on your VPS. There are two ways to authenticate:

    Option 1: API token (simpler for a VPS)

    1. Get an API token from the web app: https://app.githits.com/settings/tokens
    2. Set your GitHits API token on the VPS:
    export GITHITS_API_TOKEN='your-api-token'

    Then run GitHits from that shell—no browser login needed. If an agent or service launches GitHits, configure the variable in its environment too.

    Option 2: Browser login through an SSH tunnel

    On your laptop, run this and leave it running, replacing user@your-vps with your SSH destination:

    ssh -N -L 8765:127.0.0.1:8765 user@your-vps

    In your VPS terminal, cancel the previous login and start a fresh one:

    npx githits@latest login --no-browser --port 8765

    Open the new sign-in link on your laptop and click Connect. The tunnel forwards the callback to the VPS so login can complete. Once it finishes, stop the tunnel with Ctrl+C.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions