Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

magento-composer-1. 0.2.0.zip file could not be downloaded #2419

Closed
patrickpeng2091 opened this issue Nov 19, 2015 · 30 comments
Closed

magento-composer-1. 0.2.0.zip file could not be downloaded #2419

patrickpeng2091 opened this issue Nov 19, 2015 · 30 comments
Assignees
Labels
bug report Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development

Comments

@patrickpeng2091
Copy link

[Composer\Downloader\TransportException]
The "https://repo.magento.com/archives/magento/composer/magento-composer-1.
0.2.0.zip" file could not be downloaded (HTTP/1.1 404 Not Found)

@BlackIkeEagle
Copy link
Member

@oucart seems the composer.lock file is wrong

When you run composer update (you must give your magento connect credentials) it gets the magento-composer package from packages.magento.com, not from repo.magento.com

@bh-ref
Copy link
Contributor

bh-ref commented Nov 19, 2015

I had the same problem. Just use the magento 2.0.0 code base from here: https://www.magentocommerce.com/download this has up to date dependencies as it seems

@bh-ref
Copy link
Contributor

bh-ref commented Nov 19, 2015

the main difference: package.json on github does list magento/magento-composer-installer as a dependency, but the package.json from https://www.magentocommerce.com/download does not.

@BlackIkeEagle
Copy link
Member

@bh-ref makes sense since you don't need to install anything via composer there is no need for a dependency on magento/magento-composer-installer

@bh-ref
Copy link
Contributor

bh-ref commented Nov 19, 2015

@BlackIkeEagle I see. Unfortunately, the problem is, that the asterisk for the magento/magento-composer-installer dependency evaluates into version 1.0.2.0 which is not available in the repo

@BlackIkeEagle
Copy link
Member

@bh-ref the asterisk does not matter if you are running composer install. I suggest using composer update which will get you the composer-installer from packages.magento.com and not from repo.magento.com

@bh-ref
Copy link
Contributor

bh-ref commented Nov 19, 2015

@BlackIkeEagle thank you for your response. I will try that for my next test installation. If that is the solution, does that mean that the docs at http://devdocs.magento.com/guides/v2.0/install-gde/install/prepare-install.html should be changed to suggest using composer updateinstead of composer install?

@BlackIkeEagle
Copy link
Member

@bh-ref no the docs should not be updated, the composer.lock file must be fixed and point to an existing location/file /cc @maksek

@marcobax
Copy link

I've put up a blog post explaining how to resolve this issue step by step, check it out at: http://magento2king.com/magento2-insta-be-downloaded/

@gsomoza
Copy link
Contributor

gsomoza commented Nov 19, 2015

@BlackIkeEagle I'm having the same issue, on the most recent master commit at the time of writing (4cae5d058b7a).

Unless I'm missing something important (which is possible), using composer update doesn't seem to be the recommended workflow for projects that have composer.lock files versioned. composer install is supposed to be enough. Ref: https://blog.engineyard.com/2014/composer-its-all-about-the-lock-file. So it seems like you should gitignore the composer.lock file if the workflow requires an update. Then people that run composer install will not run into this issue.

@BlackIkeEagle
Copy link
Member

@gabrielsomoza I'm not saying its recommended to do it like this, for me it was the solution that worked.

@marcobax that indeed is the solution, so this is rather a composer issue then or the repo.magento.com server does not return a 401 to composer?

Personally I'm somewhat offended that you must pull magento/composer from a password protected server while there is no need at all for that package to be hidden behind a password.

@muasir
Copy link

muasir commented Nov 19, 2015

@marcobax and @BlackIkeEagle this is an issue with repo.magento.com. We are currently working on this issue.

@muasir muasir added PS Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development bug report labels Nov 19, 2015
@gsomoza
Copy link
Contributor

gsomoza commented Nov 19, 2015

@BlackIkeEagle 👍 to what you said about authentication for CE

@marcobax
Copy link

@BlackIkeEagle @gabrielsomoza Yes! This is very true, I also think there is no need to authenicate for pulling Magento2 CE.

@muasir muasir added the PROD label Nov 19, 2015
@crystallove
Copy link

This is an issue with repo.magento.com.
You can wait until it is fixed or you follow the solutions at below. It should be worked.
http://magento2king.com/magento2-insta-be-downloaded/

  1. Login to github, and get the personal access key token.
  2. Use that token and your magento.com login credentials.
  • Create or Edit auth.json at .composer
  • Your auth.json should be looked like this:
    {
    "github-oauth": {
    "github.com": "your token here"
    },
    "http-basic": {
    "repo.magento.com": {
    "username": "your magento.com username",
    "password": "your magento.com pw"
    }
    }
    }

Try to run composer install again. It works like a charm.

@aamnah
Copy link

aamnah commented Nov 20, 2015

faced the same issue, the solution @marcobax and @crystallove mentioned worked.

@muasir
Copy link

muasir commented Nov 20, 2015

We have fixed the 404 issue. Now with invalid credentials you will get the 401 error. But you will also need new auth tokens, please follow this link to generate the tokens http://devdocs.magento.com/guides/v2.0/install-gde/prereq/connect-auth.html

@realdigid
Copy link

I believe this is a related issue, but i'm getting this when i attempt to deploy sample data to my build. Is there a flag i'm missing or something?

(Note: my credentials already exist within ~/.composer/auth.json and already did "composer update")

$ php bin/magento sampledata:deploy
./composer.json has been updated
Loading composer repositories with package information

[Composer\Downloader\TransportException]
The 'https://repo.magento.com/packages.json' URL required authentication.
You must be using the interactive console to authenticate

@davidalger
Copy link
Member

@realdigid Have you updated your auth username/password with the tokens generated via instructions found here: http://devdocs.magento.com/guides/v2.0/install-gde/prereq/connect-auth.html?

@realdigid
Copy link

Yes i have. I will attempt to do so again tomorrow just to verify. All other processes work fine using the same credentials as well, such as composer update/install it seems specific to sample data.

@ghost
Copy link

ghost commented Nov 23, 2015

@realdigid That issue is solved by running composer update from the Magento root. A better fix is in the works. (Sample data suppresses messages from Composer.)

@KvantX
Copy link

KvantX commented Nov 27, 2015

I have the same problem as @realdigid and composer update doesn't solve it.

@daapower
Copy link

having the same issue as KvantX and realdigid. i have updated composer..

@APGD2016
Copy link

I hit the same problem as @realdigid, @KvantX @daapower

@BlackIkeEagle
Copy link
Member

@KvantX , @daapower , @APGD2016 you should check http://devdocs.magento.com/guides/v2.0/install-gde/prereq/dev_install.html

You must have entered your credentials before trying to add the sample data. So the working solution should be something like:

$ git clone https://github.com/magento/magento2.git
$ cd magento2
$ composer install
   # along the way you get asked to enter credentials (on the magento-composer-installer package)
   # the credentials should be generated as described in the devdocs and not your magento email/pass
$ bin/magento sampledata:deploy # should work if you stored your credentials

@KvantX
Copy link

KvantX commented Dec 23, 2015

@BlackIkeEagle Thanks for advice, it can be so.
I installed magento according to http://devdocs.magento.com/guides/v2.0/install-gde/prereq/integrator_install.html

composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition

and it's possible that i have entered credentials before sampledata:deploy

@BlackIkeEagle
Copy link
Member

@KvantX I confirm the issue when using composer create-project, even with valid credentials the bin/magento sampledata:deploy command fails

$ php bin/magento sampledata:deploy
./composer.json has been updated
Loading composer repositories with package information



  [Composer\Downloader\TransportException]                                   
  The 'https://repo.magento.com/packages.json' URL required authentication.  
  You must be using the interactive console to authenticate                  



require [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-update] [--update-no-dev] [--update-with-dependencies] [--ignore-platform-reqs] [--sort-packages] [packages1] ... [packagesN]


There is an error during sample data deployment.

but after that issue running composer update seems to work

$ composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
  - Installing magento/module-catalog-sample-data (100.0.2)
    Downloading: 100%         

  - Installing magento/module-bundle-sample-data (100.0.2)
    Downloading: 100%         

  - Installing magento/module-customer-sample-data (100.0.2)
    Downloading: 100%         

  - Installing magento/module-widget-sample-data (100.0.2)
    Downloading: 100%         

  - Installing magento/sample-data-media (100.0.2)
    Downloading: 95% 

@APGD2016
Copy link

@BlackIkeEagle Thanks very much for your help! My problem is fixed.

@tanya-soroka
Copy link

Hello
Could you please confirm that the issues has been resolved? If yes, please go ahead and close the ticket.

Thanks

@BlackIkeEagle
Copy link
Member

@tanya-soroka I confirm the issue is resolved, you can close this ticket or @patrick4u can close it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development
Projects
None yet
Development

No branches or pull requests