Incorrect credentials
Incorrect credentials
This topic discusses how to resolve issues with incorrect credentials in your auth.json
. You might have entered Magento Open Source credentials or shared keys for Magento Commerce.
Symptom
The most common symptom of incorrect credentials is a deployment failure with an authentication error similar to the following:
1
The 'https://repo.magento.com/archives/magento/magento-cloud-configuration/magento-magento-cloud-configuration-1.0.3.0.zip' URL could not be accessed: HTTP/1.1 403 Forbidden
To see the error log:
- Log in to your project.
-
Click Failure to view the log as the following figure shows.
Solution
To resolve this issue, you must clone the project locally and update auth.json
with the correct Magento Commerce authorization keys and run composer update
to update project dependencies. After that, you can deploy your project successfully and get started with your development.
Verify that you are using your own keys, and not shared account keys.
Get started
To get started:
- Log in to the machine on which your SSH keys are located.
-
Log in to your project:
1
magento-cloud login
-
List your projects:
1
magento-cloud project:list
-
If necessary, clone a project.
1
magento-cloud project:get <project ID>
-
Change to a project directory.
For example if your project is named Magento 2,
cd magento-2
Update auth.json
and redeploy the environment
To resolve the issue with credentials:
- If you haven’t done so already, change to the project root directory.
- Open
auth.json
in a text editor. - Change the value of
username
to your Magento Commerce public key. - Change the value of
password
to your Magento Commerce private key. - Save your changes to
auth.json
and exit the text editor. -
Update project dependencies:
1
composer update
-
Add, commit, and push your changes:
1 2 3
git add -A git commit -m "<message>" git push origin master
-
Wait for the project to deploy.
A snippet of messages for a successful deployment follows:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
Building application 'mymagento' (runtime type: php:7.0, tree: e8450f9)
Generating runtime configuration.
Moving the application to the output directory
Prewarming composer cache.
Pre-downloaded 3 packages referenced in `composer.lock`
Found a `composer.json`, installing dependencies.
Executing post-build hook...
[2016-05-31 14:36:58] Start build.
[2016-05-31 14:36:58] Patching Magento.
[2016-05-31 14:36:58] Command:/usr/bin/php /app/vendor/magento/magento-cloud-configuration/src/Magento/MagentoCloud/../../../patch.php
[2016-05-31 14:36:59] Status:0
[2016-05-31 14:36:59] Output:array (
... more ...
[2016-05-31 14:36:59] Command:cd bin/; /usr/bin/php ./magento setup:di:compile
[2016-05-31 14:38:27] Status:0
[2016-05-31 14:38:27] Output:array (
0 => 'Compilation was started.',
1 => '%message% 0/7 [>---------------------------] 0% 1 sec 42.0 MiB%message% 0/7 [>---------------------------] 0% 1 sec 42.0 MiBProxies code generation... 0/7 [>---------------------------] 0% 1 sec 42.0 MiB',
2 => 'Proxies code generation... 1/7 [====>-----------------------] 14% 1 sec 48.0 MiB',
3 => 'Repositories code generation... 1/7 [====>-----------------------] 14% 1 sec 48.0 MiB',
4 => 'Repositories code generation... 2/7 [========>-------------------] 28% 12 secs 60.0 MiB',
5 => 'Service data attributes generation... 2/7 [========>-------------------] 28% 12 secs 60.0 MiB',
6 => 'Service data attributes generation... 3/7 [============>---------------] 42% 12 secs 60.0 MiB',
7 => 'Application code generator... 3/7 [============>---------------] 42% 12 secs 60.0 MiB',
8 => 'Application code generator... 4/7 [================>-----------] 57% 34 secs 174.0 MiB',
9 => 'Interceptors generation... 4/7 [================>-----------] 57% 34 secs 174.0 MiB',
10 => 'Interceptors generation... 5/7 [====================>-------] 71% 53 secs 180.0 MiB',
11 => 'Area configuration aggregation... 5/7 [====================>-------] 71% 53 secs 180.0 MiB',
12 => 'Area configuration aggregation... 6/7 [========================>---] 85% 2 mins 180.0 MiB',
13 => 'Interception cache generation... 6/7 [========================>---] 85% 2 mins 180.0 MiB',
14 => 'Interception cache generation... 7/7 [============================] 100% 2 mins 180.0 MiB',
15 => 'Generated code and dependency injection configuration successfully.',
)
[2016-05-31 14:38:27] Clearing temporary directory.
[2016-05-31 14:38:27] Command:rm -rf ../init/*
[2016-05-31 14:38:27] Status:0
[2016-05-31 14:38:27] Output:array (
... more ...
Executing pre-flight checks...
Compressing application.
Beaming package to its final destination.
Creating environment aqf7hrijhl52o-master.
Environment configuration:
mymagento (type: php:7.0, size: S, disk: 2048)
mysql (type: mysql:10.0, size: S, disk: 2048)
redis (type: redis:3.0, size: S)
solr (type: solr:4.10, size: S, disk: 1024)
Environment routes:
http://master-aqf7hrijhl52o.us.magentosite.cloud/ is served by application `mymagento`
https://master-aqf7hrijhl52o.us.magentosite.cloud/ is served by application `mymagento`
To aqf7hrijhl52o@git.us.magento.cloud:aqf7hrijhl52o.git
34afd91..98c2166 master -> master
Verify the deployment
To verify the deployment was successful, enter one of the URLs displayed under Environment routes:
in a web browser.
For security reasons, we strongly recommend you change your Magento Admin URI, administrator username, and administrator password. For step-by-step details, see Set environment and project variables.