Skip to content
This repository has been archived by the owner on Jul 4, 2024. It is now read-only.

[domain list] - Invalid API key, please use 'gandi setup' command. #311

Closed
fccagou opened this issue Feb 14, 2021 · 2 comments
Closed

[domain list] - Invalid API key, please use 'gandi setup' command. #311

fccagou opened this issue Feb 14, 2021 · 2 comments

Comments

@fccagou
Copy link

fccagou commented Feb 14, 2021

Hello

I just have installed gandi using venv and pip then create an api key on v5 web interface at
https://account.gandi.net/en/users/MYACCOUNT/security

User python 3.9.1 from ArchLinux

$ python --version
$ Python 3.9.1

Install python venv

$ python -m venv gandi-cli
$ . gandi-cli/bin/activate
(gandi-cli) $ pip install gandi.cli
...

Chek installed cli

(gandi-cli) $ gandi --version
Gandi CLI 1.6
Copyright: © 2014-2018 Gandi S.A.S.
License: GPL-3

(gandi-cli)  $ gandi api 
API version: 3.3.37

Run setup

(gandi-cli) $  gandi setup
Welcome to GandiCLI, let's configure a few things before we start.

Api key (xmlrpc) [...]: xxxxxxxxxxxxxxxxxxxxxxxxxxx
Environnment [production]/ote (ote, production): 
SSH keyfile [~/.ssh/id_rsa.pub]: ~/.ssh/id_rsa.pub
Api key (REST) [...]: xxxxxxxxxxxxxxxxxxxxxxxxxx

Setup completed. You can now:
* use 'gandi' to see all command.
* use 'gandi vm create' to create and access a Virtual Machine.
* use 'gandi paas create' to create and access a SimpleHosting instance.

Test cli

(gandi-cli) $  gandi domain list
Invalid API key, please use 'gandi setup' command.

Conf file

(gandi-cli)  $ cat  ~/.config/gandi/config.yaml
api:
    host: https://rpc.gandi.net/xmlrpc/
    key: xxxxxxxxxxxxxxxxxxxxxxxxxxxx
apirest:
    key: xxxxxxxxxxxxxxxxxxxxxxxxxxxx
sshkey:
- /home/fccagou/.ssh/id_rsa.pub

gandi dns list works fine.

So, XMLRPC doesn't work while RESTapi works.

@fccagou fccagou changed the title Invalid API key, please use 'gandi setup' command. [domain list] - Invalid API key, please use 'gandi setup' command. Feb 14, 2021
@s0nik42
Copy link

s0nik42 commented Feb 14, 2021

same problem for me using pip install a few hours ago.

@fccagou fccagou closed this as completed Feb 14, 2021
@fccagou
Copy link
Author

fccagou commented Feb 14, 2021

After reading all issues, the problem is the same then the ones described in #255 and #279.
The PR #310 seems in progress to correct the issues.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants