# Can not use --access-token with newly created token

**URL:** <https://community.fly.io/t/can-not-use-access-token-with-newly-created-token/958>\
**Category:** General\
**Created:** [March 18, 2021, 2:50pm UTC](https://community.fly.io/t/can-not-use-access-token-with-newly-created-token/958 "2021-03-18T14:50:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pieterm](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/pieterm/32/306_2.png) [@pieterm](https://community.fly.io/u/pieterm)\
**Post date:** [March 18, 2021, 2:50pm UTC](https://community.fly.io/t/can-not-use-access-token-with-newly-created-token/958/1 "2021-03-18T14:50:01Z")

</div>

We’re running **0.0.189** and since this version all commands using `--access-token` fail with the error

```auto
Error No access token available. Please login with 'flyctl auth login'

```

We first ran into this on our CI because we install the latest version each deploy. Locally it worked until after the upgrade.

---

<div class="post-metadata">

**Author:** ![kurt](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/kurt/32/43757_2.png) [@kurt](https://community.fly.io/u/kurt)\
**Post date:** [March 18, 2021, 3:38pm UTC](https://community.fly.io/t/can-not-use-access-token-with-newly-created-token/958/2 "2021-03-18T15:38:39Z")

</div>

Wow that’s not great.

You’re just setting your access token to deploy from CI? We’ll see why the `--access-token` arg regressed (I have guesses). However, it’s better to use an env variable for this. Is it possible for you to set `FLY_ACCESS_TOKEN` as an environment variable and stop using the arg?

---

<div class="post-metadata">

**Author:** ![pieterm](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/pieterm/32/306_2.png) [@pieterm](https://community.fly.io/u/pieterm)\
**Post date:** [March 19, 2021, 8:00am UTC](https://community.fly.io/t/can-not-use-access-token-with-newly-created-token/958/3 "2021-03-19T08:00:14Z")

</div>

I hadn’t thought about setting the environment variable. That certainly fixed our CI build pipeline. Thanks!
