question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Docker 'token-generate root m' : command not found

See original GitHub issue

What happened?

Hello to all My name is Thierry and I started today the implementation of reposilite to manage a team maven repository. So I’m new with reposilite. I installed the 3.0.0-alpha.16 version with docker and I started it as a daemon without any problem. Now, I’m trying to generate the authorization tokens : I connect in my container with the usual way (docker exec -it -u root reposilite /bin/bash) and then I run the command token-generate root m as indicated in the documentation but the command token-generate is not found.

Has anyone encountered this bug before? Is it related to the fact that this is an alpha version?

Thanks for your help Thierry

Reposilite version

3.x

Relevant log output

[theirman@sicpa 1.0]$ docker images
REPOSITORY                      TAG                 IMAGE ID            CREATED             SIZE
docker.io/dzikoysk/reposilite   3.0.0-alpha.16      f8b81bb8e4e3        3 days ago          452 MB


[theirman@sicpa 1.0]$ docker ps
CONTAINER ID        IMAGE                                          COMMAND                  CREATED             STATUS              PORTS                  NAMES
c948e58408d7        docker.io/dzikoysk/reposilite:3.0.0-alpha.16   "/bin/sh -c 'exec ..."   2 hours ago         Up 5 months         0.0.0.0:8080->80/tcp   reposilite


[theirman@sicpa 1.0]$ docker exec -it -u root reposilite /bin/bash

root@c948e58408d7:/app# token-generate root m
bash: token-generate: command not found

root@c948e58408d7:/app# updatedb
root@c948e58408d7:/app# locate token-generate
root@c948e58408d7:/app#

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
theirmancommented, Jan 4, 2022

To be complete for those who would encounter this kind of problem:

  • start the docker container in interactive mode (example: docker run -it --name reposilite -v reposilite-data:/app/data -p 8080:80 docker.io/dzikoysk/reposilite:3.0.0-alpha.16)
  • launch the creation of the token for the root user token-generate root m and copy the token
  • stop the container with CTRL+C
  • start the container as a daemon: docker start reposilite
  • access the web console and login with the token as root
  • you’re done! 😃

And if you have other tokens to create, you don’t need to redo the whole process above, you can create them in the CONSOLE tab of the web interface

Thanks again @dzikoysk

0reactions
dzikoyskcommented, Nov 9, 2022

No, permanent token can be only generated using token-generate command. Flag can only bootstrap temporary management token to provide a way to create first user in environments that do not provide interactive console, but in general, the rest of setup should be provided in the dashboard console where you cam e.g. assign given routes to your tokens.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Container command '/start.sh' not found or does not exist ...
Everytime In my dockerfile when i am copying a linux system file like crontab or any script there were some characters ^m were...
Read more >
How to Fix and Debug Docker Containers Like a Superhero
Take the container's default command and attempt to run it again. A “command not found” error message will appear.
Read more >
Try Docker Compose - Docker Documentation
This basic retry loop lets us attempt our request multiple times if the redis service is not available. This is useful at startup...
Read more >
docker run - Docker Documentation
The -w lets the command being executed inside directory given, here /path/to/dir/ . If the path does not exist it is created inside...
Read more >
Use Docker Compose - Docker Documentation
At the root of the app project, create a file named docker-compose.yml . · In the compose file, we'll start off by defining...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found