pantheon-systems / terminus-build-tools-plugin

Manage multidev environments for a Pantheon site using a GitHub PR workflow.
83 stars 68 forks source link

CircleCI API Authentication Fails #461

Closed matbrady closed 2 years ago

matbrady commented 2 years ago

Problem

Unable to authenticate with CircleCI API using a Personal API Token when creating a new project. Example command:

terminus build:project:create --admin-password="***********" shortcut-name project-name

After providing a newly created API token, I'm continuously prompted with

Call CircleCI API: https://circleci.com/api/v1.1/me
Your provided authentication token could not be used to authenticate with the CircleCI service. Please re-enter your credential.
Screen_Shot_2022-09-21_at_12_43_06_PM Screen Shot 2022-09-21 at 12 49 29 PM

Circle CI API /me response ( https://circleci.com/api/v1.1/me)

API Response ``` { "enrolled_betas" : [ ], "in_beta_program" : false, "selected_email" : "REDACTED", "avatar_url" : "https://avatars.githubusercontent.com/u/REDACTED?v=4", "trial_end" : "2018-01-23T20:44:14.807Z", "admin" : null, "basic_email_prefs" : "smart", "sign_in_count" : 37, "github_oauth_scopes" : [ "user:email", "repo" ], "email_authentication" : null, "analytics_id" : "REDACTED", "name" : "REDACTED", "gravatar_id" : null, "first_vcs_authorized_client_id" : "REDACTED", "days_left_in_trial" : -1701, "privacy_optout" : false, "parallelism" : 1, "student" : false, "bitbucket_authorized" : false, "github_id" : REDACTED, "web_ui_pipelines_optout" : "opted-in", "bitbucket" : null, "dev_admin" : false, "all_emails" : [ "REDACTED", "REDACTED", "REDACTED" ], "created_at" : "2018-01-09T20:44:14.807Z", "plan" : null, "identities" : { "github" : { "avatar_url" : "https://avatars.githubusercontent.com/u/REDACTED?v=4", "external_id" : REDACTED, "id" : REDACTED, "name" : "REDACTED", "user?" : true, "domain" : "github.com", "type" : "github", "authorized?" : true, "provider_id" : "REDACTED", "login" : "REDACTED" } }, "projects" : "REDACTED", "login" : "REDACTED", "organization_prefs" : { }, "containers" : 1, "pusher_id" : "REDACTED", "web_ui_pipelines_first_opt_in" : true, "num_projects_followed" : 21 } ```

Versions

tedw commented 2 years ago

Same issue here. Everything looks fine when I view https://circleci.com/api/v1.1/me as well as https://circleci.com/api/v2/me, though the v2 output looks like this:

{
  "name" : "Ted Whitehead",
  "login" : "REDACTED",
  "id" : "REDACTED"
}
kporras07 commented 2 years ago

This was fixed and 3.0.4 was just released. Thanks for reporting