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

atlantis testdrive fails with error: opening pull request failed. #5175

Open
gladykov opened this issue Dec 16, 2024 · 1 comment
Open

atlantis testdrive fails with error: opening pull request failed. #5175

gladykov opened this issue Dec 16, 2024 · 1 comment
Labels
bug Something isn't working provider/github

Comments

@gladykov
Copy link

> sudo NGROK_AUTHTOKEN=<token> ./atlantis testdrive

Welcome to Atlantis testdrive!

This mode sets up Atlantis on a test repo so you can try it out. We will
- fork an example terraform project to your username
- install terraform (if not already in your PATH)
- install ngrok so we can expose Atlantis to GitHub
- start Atlantis

Press Ctrl-c at any time to exit


github.com username: <user>

To continue, we need you to create a GitHub personal access token
with "repo" scope so we can fork an example terraform project.

Follow these instructions to create a token (we don't store any tokens):
https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token#creating-a-fine-grained-personal-access-token
- use "atlantis" for the token description
- add "repo" scope
- copy the access token

GitHub access token (will be hidden): 
=> forking repo 
=> fork completed!
=> terraform found in $PATH at /usr/local/bin/terraform
=> ngrok found in $PATH at /usr/bin/ngrok
=> creating secure tunnel
=> started tunnel!
=> starting atlantis server
⠏=> atlantis server is now securely exposed at https://6187-2804-14c-da96-8cc3-00-1fbe.ngrok-free.app

=> creating atlantis webhook
=> atlantis webhook created!
=> creating a new pull request
=> pull request created!
=> opening pull request
⠴=> opening pull request failed. please go to: https://github.com/<user>/atlantis-example/pull/1 on the browser
atlantis is running 
 [press Ctrl-c to exit]

Notes:

  1. PR is being created https://github.com//atlantis-example/pull/1
  2. Instruction to create token are unclear:
@gladykov gladykov added the bug Something isn't working label Dec 16, 2024
Copy link

dosubot bot commented Dec 16, 2024

To resolve the issue with the atlantis testdrive command failing to open a pull request, ensure you are using a GitHub personal access token with the correct permissions. You can use either a fine-grained or classic token, but it must have the "repo" scope. This scope is typically associated with classic tokens, which might be causing confusion if you're following instructions for fine-grained tokens. Make sure your token has the necessary permissions to fork repositories and set commit statuses [1].

If the pull request is created but not opening automatically, you can manually visit the URL provided in the error message to view the pull request in your browser [2].

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working provider/github
Projects
None yet
Development

No branches or pull requests

1 participant