PostHog / PostHog/posthog

setup wizard github connection doesn't work if already authenticated

Open
#70,474 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
39.9k
Forks
3.4k
Avg merge
6h 51m
Merged PRs (30d)
232

Description

Bug Description

I have already connected posthog to github previously for a different posthog project, but when trying to run the setup wizard, it requires me to authenticate again. If I try to say I've already connected, it says I haven't. On github, it says it's already connected. The only way for me to resolve this is by uninstalling on github, and then reconnecting.

npx -y @posthog/wizard@latest self-driving --region eu

How to reproduce

  1. Create a Posthog project
  2. Run npx -y @posthog/wizard@latest self-driving --region eu
  3. Connect with Github
  4. Create a new Posthog project
  5. Run npx -y @posthog/wizard@latest self-driving --region eu again
  6. Try to connect with Github
Debug info
No bug report - this is a cli issue

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the flow with npx -y @posthog/wizard@latest self-driving --region eu: connect GitHub for one PostHog project, create another, and run the wizard again. Trace the wizard's GitHub connection check and compare its result with GitHub's existing connection state. Done means an already-connected GitHub account can be recognized for the second project without uninstalling and reconnecting.

Written by the indexing model from the issue text.

Assessment

Tech stack
github, shell
Domain
authentication, cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.