caprover / caprover-cli

Command Line Interface for https://github.com/caprover/caprover
72 stars 40 forks source link

Stuck in the middle when entering 2nd bad password in serversetup #116

Closed nixilb closed 2 years ago

nixilb commented 2 years ago

serversetup failed because the second password was not the same as the first one. As is is HIDDEN I had no chance to now what the first one was.

Now I'm stuck:

e:>caprover serversetup

Setup CapRover machine on your server...

? have you already started CapRover container on your server? Yes ? IP address of your server: xxx

You may have already setup the server with root domain: vps-roro.ovh! Use caprover login to log into an existing server.

The caprover login in another nightmare. I want to go back. where is the state to delete?

Tried in C:\Users\nisju.config\configstore but failed.

I just want to rollback to the state before.

By the way: there is NO PIRATES behind me in my room.

githubsaturn commented 2 years ago

What's the issue with caprover login?

If caprover serversetup says your server is fully configured, all you need to do is to run caprover login

nixilb commented 2 years ago

serversetup failed because the second password was not the same as the first one. It didn't say it was configured. (for instance I didn't get the opportunity to enter the email address to get certificate and enable HTTPS)

nixilb commented 2 years ago

Is it possible to avoid: docker service rm $(docker service ls -q) rm -rf /captain docker swarm leave --force

githubsaturn commented 2 years ago

If serversetup exits before you enable HTTPs, you can always run serversetup again.

nixilb commented 2 years ago

yes, but is stops saying:

You may have already setup the server with root domain: vps-roro.ovh! Use caprover login to log into an existing server.

even if it did'nt end correctly

githubsaturn commented 2 years ago

Okay, so just login to your dashboard via web: captain.yourrootdomain.com and just user captain42 as password.

Then click on ENABLE HTTPS > enter email Then click on FORCE HTTPS

Then run caprover login on your local machine

nixilb commented 2 years ago

captain.yourrootdomain.com:3000 I suppose

githubsaturn commented 2 years ago

yes, but you don't need :3000 probably

nixilb commented 2 years ago

Done (the port was needed). I suppose it fixed the HTTPS part. I worry about the badly entered password it asked twice. And what about the CapRover machine name, with whom the login credentials are stored locally ? I hadn't the opportunity to enter it

githubsaturn commented 2 years ago

You can use caprover login and save the credentials locally

nixilb commented 2 years ago

what is it for (local credentials)?

githubsaturn commented 2 years ago

When you want to run caprover deploy it uses those creds.

nixilb commented 2 years ago

Login fails (may be because the password I was not able to enter in the setup fails?):

e:>caprover login Login to a CapRover machine...

? CapRover machine URL address, it is "[http[s]://][captain.]your-captain-root.domain": http://captain.vps-roro.ovh ? CapRover machine password: [hidden] ? CapRover machine name, with whom the login credentials are stored locally: fidji

Something bad happened: cannot save fidji at http://captain.vps-roro.ovh. 302 - undefined

githubsaturn commented 2 years ago

For your root domain enter https if you've enabled HTTPS

nixilb commented 2 years ago

I was able to login using captain42 as a password:

Login to a CapRover machine...

? CapRover machine URL address, it is "[http[s]://][captain.]your-captain-root.domain": https://captain.vps-roro.ovh ? CapRover machine password: [hidden] ? CapRover machine name, with whom the login credentials are stored locally: fidji

Logged in successfully. Authorization token is now saved as fidji at https://captain.vps-roro.ovh.

And now does C:\Users\nisju.config\configstore\caprover.json exist.

How to change psw?

nixilb commented 2 years ago

I changed password in the dashboard. I can now connect to the dashboard to the new one. Now I suppose the auth part in C:\Users\nisju.config\configstore\caprover.json is wrong. Should I caprover login again with the new password?

githubsaturn commented 2 years ago

Yes. You can first logout, then log in using the new password.

nixilb commented 2 years ago

Done. Do you think everything is ok now?

githubsaturn commented 2 years ago

It should be

nixilb commented 2 years ago

Merci +++. (awesome support)