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

reconstruct fails #30

Open
tessalt opened this issue Jun 3, 2019 · 6 comments
Open

reconstruct fails #30

tessalt opened this issue Jun 3, 2019 · 6 comments

Comments

@tessalt
Copy link

tessalt commented Jun 3, 2019

Orb version

1.1.0

What happened

attempting to include -compare-url/reconstruct as a step, fails with Exited with code 1

checking if cicd is a new branch...
----------------------------------------------------------------------------------------------------
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

100    37  100    37    0     0   1241      0 --:--:-- --:--:-- --:--:--  1275
----------------------------------------------------------------------------------------------------
yes, cicd is new and f673e3c10bdcf1ebcc6b36aea8515e35f7697df3 is its only commit
finding most recent ancestor commit from any other branch...
----------------------------------------------------------------------------------------------------
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

100    37  100    37    0     0    465      0 --:--:-- --:--:-- --:--:--   468
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

100    37  100    37    0     0   1696      0 --:--:-- --:--:-- --:--:--  1761
Exited with code 1

Expected behavior

Reconstruct command should not fail

@okarlsson
Copy link

@tessalt Have you included your CIRCLE_TOKEN in your environment variables?

@aecorredor
Copy link

Same here, fails for me with same exit code error. I did include the CIRCLE_TOKEN in the env variables. I included them in my project's environment variables section, I even get this job in the workflow:

#!/bin/bash -eo pipefail
if [[ -z "${CIRCLE_TOKEN}" ]]; then
  echo "ERROR: Missing environment variable CIRCLE_TOKEN" >&2
  if [[ -n "You have not stored a CircleCI API token. If this is a private repository, the next step will fail.
" ]]; then
    echo "You have not stored a CircleCI API token. If this is a private repository, the next step will fail.
" >&2
  fi
  
else
  echo "Yes, CIRCLE_TOKEN is defined!"
fi
Yes, CIRCLE_TOKEN is defined!

@aecorredor
Copy link

Turns out I was using a project token instead of a personal one. I don't recall reading anything about this in the docs, maybe I missed it. If not, it would be good to document it :) thanks for the orb

@sapanju
Copy link

sapanju commented Jul 16, 2019

I had this issue and fixed it by making sure my project API token matched the CIRCLE_TOKEN defined in the env variables of my project. So, I was able to use a project token, just had to make sure it matched the env var.

@rmuthupandian
Copy link

@sapanju I am also facing the same issue. Could you help me understand how you solved the issue. Where does Project API token set ? How to set Project token to CIRCLE_TOKEN ?

@sapanju
Copy link

sapanju commented Sep 23, 2019

@sapanju I am also facing the same issue. Could you help me understand how you solved the issue. Where does Project API token set ? How to set Project token to CIRCLE_TOKEN ?

hi @rmuthupandian - the Project API token can be created by going to your project settings page > Permissions > API Permissions (see https://circleci.com/docs/2.0/managing-api-tokens/?gclid=EAIaIQobChMIg4rgrsvn5AIVhKDsCh0BVAeDEAAYASAAEgLCwPD_BwE#creating-a-project-api-token)
Once you create a key, then you can go to your project settings > Environment Variables and set a variable for CIRCLE_TOKEN with the value equal to the API token you just set.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants