I am facing difficulty to do release with nbdev_release_gith

I have been building a benchmarking tool recently with nbdev. I was try to manage releases with nbdev. The command nbdev_release_git seems to be not working because of the below error.

  File "/home/kurianbenoy/mambaforge/lib/python3.10/site-packages/nbdev/release.py", line 117, in release_git
    ver = Release(token=token).release()
  File "/home/kurianbenoy/mambaforge/lib/python3.10/site-packages/nbdev/release.py", line 57, in __init__
    if not token: raise Exception('Failed to find token')
Exception: Failed to find token

I have installed gh and have a token which can clone the repository. During debugging I figured out that nbdev is using ghapi which needs auth token itself instead of SSH key. Is there some additional steps other than setting token with command below to get nbdev_release_git working?

gh auth login --with-token < mytoken.txt

I was able to fix this issue by setting env variable GITHUB_TOKEN. It was pointed out in this issue previously.

1 Like

Looks like you didn’t follow the instructions?

Paste that token into a file called token into the root of your repo.

You seemed to have named the file mytoken.txt ?
The code indeed looks for env variables as well before looking for the file named “token”.

1 Like

Where could I have found the instructions? Can you point a link please.

Should maybe be copied to the end-to-end tutorial, right?

2 Likes