Marketplace access keys not working "Bad credentials" error

Help. I have been trying install Magento 2.3 and although installed several times now i keep getting an error with my marketplace access keys.

I installed initially via compressed archive and that process did not prompt for access keys during install. Having done some reading i then used composer to install, which did ask for keys and i input. (i simply coped from market place and paste, i did not remove any spaces or anything so if the copy and paste process added anything in i did not remove it. Read somewhere that this happens but did not notice anything being added) Same problem still exists inputting access keys give “bad credentials” error on save.

When i initially went to input access keys there was my username and a password auto completed in the form fields.

I have set server on localhost on my Ubuntu 18.04. PHP 7.2, Apache2, currently Maria DB (but i have tried mysql too).
auth.json in home/magento/config./composer shows correct keys.

should the keys be stored anywhere else? (admin account or another location perhaps?)

When installing Magento 2 via Composer, you can’t get past the Username/Password stage unless you are using a Valid set of Keys. So they definitely worked at some stage if you were able to continue with the installation.

If the above doesn’t help, just generate a new set of keys and update them in the Web Setup Wizard.

The keys would be stored in a file called auth.json inside the Magento root directory. So, I think in your case it would be: /var/www/html/magento/auth.json

Thanks for the very prompt reply. Keys still valid but i will try a new set. Location of file is different to where I checked. I noticed them in home/magento/config./composer. I also have a auth.json file in /var/www/html/magento which i changed. I will check the location you have said too and see what is in there. I am in my other op system right now so will check in a while. I will check if in web setup wizard too as i have not previously taken that step.

I am new to Ubuntu and Magento so still learning, so apologies for all the questions.

I’ve updated my last reply because I jumped to a conclusion with your Magento directory. Let me know how you get on. I’ll check back in later.

Craig thanks again for a prompt reply. The auth.json is located in the correct location and i have new keys generated. But it still does not work :frowning_face:.

I did get an error during the validation but I think that was because i had the file open at the same time. But what did seem strange was the error message which had composer installed in my magento root /vendors/ … some directory…/composer/composer/ src/ composer/ auth.json so composer seemed to have a directory in its own directory, Might be a red herring but thought i should add the comment.

Did you make any progress with this?

Craig, the truth is I dumb. I am on a Ubuntu desktop with a virtual host. And as I am thick, I had not considered that it was virtual, with no access to the internet.

I will however ask some further questions of you. I have installed onto a Ubuntu 18.04 desktop as a virtual host as long term i wish to be able to update the site with limited downtime. My ubuntu system is for portability, on a ssd drive which I move from my home to my office and which i have created to allow me to have a clean system that is simply for Magento.

My intention was to simply upload the files and swap names of folders to give virtually no offline time when i need to update or anything similar. So my questions in relation to this are;
Is there a secure way to authenticate the keys from my virtual host? It only needs to be one off, just so that i know they work. I am guessing opening some ports or something. But I have no knowledge of how or what in this area.

Secondly, am I taking a sensible approach to the update process or is there a much simpler way to do this. I do not want to incur much cost initially as this is a long term plan to grow my business. When i have quite a few clients I am very likely to start promoting the business and at that point I will no doubt have a dedicated server.

We’ve all been there :grinning:

To answer the remainder of your question, the last time I used something like VirtualBox to develop out of I kept getting the Blue Screen of Death because of a Driver incompatibility. That was years ago and I’ve not used one since.

All of my Development Environments are “Cloud based”. I can work from multiple terminals in different offices so it makes sense. And in my situation $20 per month (per server) is affordable so long as I don’t go too crazy.

When I work on the Dev Servers, I use version control tools (specifically to track all of my changes to a repository. So, when I make updates on a Dev Server I “push” the changes… And when I’m on the Production server I “pull” the changes. Or if I have to spin up another Dev Server, I can pull all the files from the git repository.

(Rushed hand-drawn flowchart)

On each of my terminals, I have a powerful IDE Program (PhpStorm) to sync files and write code. It creates a copy of the working files on my Dev servers and syncs them whenever I’m working.

Honestly, the whole thing sounds really faffy, complicated and overwhelming - But it works really well for me and my colleagues because:

  1. Multiple redundancies in case of catastrophic failure
  2. All code changes are easily tracked (who, when, what)
  3. Anyone can be added to the project and start working within minutes

Craig, Thanks for the response and the information. That looks like a sensible process.

But it wont work for me right now. I have margins of only 3-5% and already pay Mr Amazon and Mrs eBay lots more money than I make, in fees. Then I have 3 or 4 more subs at £30 a pop each month and all of a sudden you realise you have to sell a lot each month to break even. So Magento is about improving that margin but until it starts to fund itself I need to control the cost rigidly.
So thanks for the reply, and hopefully this discussion will help some other newbie too.

1 Like