# Allow auto login via password / tokens for Yak push

**URL:** <https://discourse.mcneel.com/t/allow-auto-login-via-password-tokens-for-yak-push/202401>\
**Category:** Yak\
**Tags:** windows, yak\
**Created:** [April 1, 2025, 1:55pm UTC](https://discourse.mcneel.com/t/allow-auto-login-via-password-tokens-for-yak-push/202401 "2025-04-01T13:55:40Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![xliotx](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/xliotx/32/520428_2.png) [@xliotx](https://discourse.mcneel.com/u/xliotx)\
**Post date:** [April 1, 2025, 1:55pm UTC](https://discourse.mcneel.com/t/allow-auto-login-via-password-tokens-for-yak-push/202401/1 "2025-04-01T13:55:40Z")

</div>

I’m trying to set up a GitHub action for auto building and pushing my GH plugin.

The current problem of making everything automated is the login process.

By default, if I do it on my own computer, the `yak login` will open a webpage and I need to click it to log into my account.

However, this process is not feasible for Github Actions…

Is there a way to pass this step with some login token?

---

<div class="post-metadata">

**Author:** ![CallumSykes](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/callumsykes/32/569341_2.png) [@CallumSykes](https://discourse.mcneel.com/u/CallumSykes)\
**Post date:** [April 1, 2025, 1:59pm UTC](https://discourse.mcneel.com/t/allow-auto-login-via-password-tokens-for-yak-push/202401/2 "2025-04-01T13:59:36Z")

</div>

`yak login --ci`  
will give you a token you can use

> [@Yak CI Login Fails](https://discourse.mcneel.com/t/yak-ci-login-fails/157409):
>
> Hey discourse, I’m having a problem creating a token for yak to use in my CI/CD. I created an action : [GitHub - crashcloud/yak-publish: Builds and publishes any Rhino and/or Grasshopper plugin(s)](https://github.com/crashcloud/yak-publish) And I’m trying to use it for this project: [GitHub - structurecraft/NUnitTestRunner: The NUnitTestRunner allows for running of NUnit test assemblies inside of Rhino from a command](https://github.com/structurecraft/NUnitTestRunner) In the GithubActions run I get this error message: There was an error retrieving your cached token. Please `yak login` a…

---

<div class="post-metadata">

**Author:** ![xliotx](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/xliotx/32/520428_2.png) [@xliotx](https://discourse.mcneel.com/u/xliotx)\
**Post date:** [April 1, 2025, 2:02pm UTC](https://discourse.mcneel.com/t/allow-auto-login-via-password-tokens-for-yak-push/202401/3 "2025-04-01T14:02:13Z")

</div>

Thanks! super fast reply.

for

```auto
https://accounts.rhino3d.com/oauth2/auth?response_type=id_token+token&client_id=yak&redirect_uri=http://localhost:5123/&scope=profile+openid+email+noexpire&state=<token>`

```

You mean the token is the token part?  
How do I use it for `yak login` then?

When running `yak login --ci` the browser still opens.

---

<div class="post-metadata">

**Author:** ![CallumSykes](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/callumsykes/32/569341_2.png) [@CallumSykes](https://discourse.mcneel.com/u/CallumSykes)\
**Post date:** [April 1, 2025, 2:29pm UTC](https://discourse.mcneel.com/t/allow-auto-login-via-password-tokens-for-yak-push/202401/4 "2025-04-01T14:29:32Z")

</div>

> [@xliotx](#):
>
> When running `yak login --ci` the browser still opens.

Yes, It’ll put a token into your command line you can copy and paste into your github secrets, then use that as an environment variable.

```auto
~\gits
❯ & $yak login --ci
Your browser has been opened to visit:

https://accounts.rhino3d.com/oauth2/auth?response_type=id_token+token&client_id=yak&redirect_uri=http://localhost:5123/&scope=profile+openid+email+noexpire&state=<redacted>

Your non-expiring(+) token is shown below. Use this to set the YAK_TOKEN
environment variable on your build machine. Remember to keep it safe!

- - - - - - - - -

<REDACTED>

- - - - - - - - -

+ OK, actually this token expires in 49 years (2075-03-20T16:30:19.8313115+01:00)

```

---

<div class="post-metadata">

**Author:** ![xliotx](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/xliotx/32/520428_2.png) [@xliotx](https://discourse.mcneel.com/u/xliotx)\
**Post date:** [April 1, 2025, 2:46pm UTC](https://discourse.mcneel.com/t/allow-auto-login-via-password-tokens-for-yak-push/202401/5 "2025-04-01T14:46:50Z")

</div>

Wait, then how do you use that `YAK_TOKEN` variable?

Am I suppose to use any mcneel provided action files, OR, how should I use that token with `yak` command? Will it find a Environmental variable automatically?

---

<div class="post-metadata">

**Author:** ![CallumSykes](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/callumsykes/32/569341_2.png) [@CallumSykes](https://discourse.mcneel.com/u/CallumSykes)\
**Post date:** [April 1, 2025, 2:59pm UTC](https://discourse.mcneel.com/t/allow-auto-login-via-password-tokens-for-yak-push/202401/6 "2025-04-01T14:59:17Z")

</div>

In your Github Action you can provide the api token (`YAK_TOKEN`) as an environment variable and then you don’t need to login in the github action ci run.

Example below:

> <https://github.com/mcneel/GSA-Grasshopper/blob/master/.github/workflows/yakdeploy.yml>

---

<div class="post-metadata">

**Author:** ![sonderskovmathias](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/sonderskovmathias/32/478545_2.png) [@sonderskovmathias](https://discourse.mcneel.com/u/sonderskovmathias)\
**Post date:** [May 14, 2026, 7:46pm UTC](https://discourse.mcneel.com/t/allow-auto-login-via-password-tokens-for-yak-push/202401/7 "2026-05-14T19:46:25Z")

</div>

I just saw that it expires in 49 years. What to do by then??? \<3 #Y2Kvibes
