Skip to content

Web Setup Wizard can't handle git repositories #11034

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

Closed
spiegl opened this issue Sep 25, 2017 · 8 comments
Closed

Web Setup Wizard can't handle git repositories #11034

spiegl opened this issue Sep 25, 2017 · 8 comments
Labels
Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed non-issue Progress: needs update

Comments

@spiegl
Copy link

spiegl commented Sep 25, 2017

Preconditions

  1. Magento 2.1.4 (also testet in Magento 2.1.7)
  2. PHP 7.0.22
  3. MySQL 5.7.19 (also testet with 10.2.8-MariaDB)
  4. Apache 2.4.18
  5. Ubuntu 16.04.2 LTS (also testet on macOS 10.12.5)
  6. Git repositories in composer.json (FireGento_FastSimpleImport2 and magento2-disable-customer-registration in my case)
  7. Composer installed as composer.phar in Magento root - not as package (also testet with composer installed with homebrew)

Steps to reproduce

  1. Login to the Magento Admin Panel
  2. Navigate to Web Setup Wizard
  3. Go to System Configuration
  4. Type in public and private access keys (in case click Reset )
  5. Click Save Config

Expected result

  1. Keys were saved and the Component Manger and the System Upgrade are working properly

Actual result

  1. Error Message:
    screenshot 2017-09-25 18 46 40
Command "show" failed: Failed to clone the [email protected]:firegento/FireGento_FastSimpleImport2.git repository, try running in interactive mode so that you can enter your GitHub credentials
                                                                                                                                                                                                          
[RuntimeException]                                                                                                                                                                                                 
Failed to execute git clone --mirror '[email protected]:firegento/FireGento_FastSimpleImport2.git' '<Magento root>/var/composer_home/cache/vcs/git-github.1485827954.workers.dev-firegento-FireGento-FastSimpleImport2.git/' show [--all] [-i|--installed] [-p|--platform] [-a|--available] [-s|--self] [-N|--name-only] [-P|--path] [-t|--tree] [package] [version]
  1. BUT: Keys were saved.
  2. Component Manger: Infinite Spinning Symbol due to 500 Internal Server Error (Can't find any Apache error logs) - (maybe refers to 2.1.3 - Web Setup Wizzard - Component Manager - spinning wheel (still doesn't work) #7958 or Additional repository kills Web Setup Wizard Component Manager performance #4986)
    screenshot 2017-09-25 18 48 03
  3. System Upgrade: Error message
    screenshot 2017-09-25 18 51 56
We cannot retrieve information on magento/product-community-edition.

Discussion

The first error message obviously refers to composer show. If I execute the command via cli everything works properly, probably because the GitHub OAuth Token is stored in ~/.config/composer/auth.json. The <Magento root>/var/composer_home/auth.json file does only contain the credentials for the magento repo, which is created by the "Save Config" action.

I've also tried to manually add the GitHub Token in <Magento root>/var/composer_home/auth.json. This does not solve the issue, but the result is slightly different.

  • System Upgrade:
    image
  • Component Manger: Infinite Spinning Symbol - no 500 Internat Server Error

If all packages, which refer to git, are deleted from composer.jsonand composer.lock the Web Setup Wizard works properly (expecting the needed packages). The Web Setup Wizard also works properly when no keys were stored in the System Config of the Web Setup Wizard.

@magento-engcom-team magento-engcom-team added the Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed label Sep 25, 2017
@dmanners
Copy link
Contributor

Hi @spiegl is the command line user the same as the web user? I think this problem could be due to the web user also requiring access to git hub via keys also. You could try adding the github key to the webuser or updating the repository to work over https rather than ssh.

@spiegl
Copy link
Author

spiegl commented Sep 30, 2017

Hi @dmanners, what do you mean with web user? The command line user is the same as the apache user (checked via htop).

@dmanners
Copy link
Contributor

Sorry yup that is what I was meaning. As long as both the command line user and apache user have access to the same key then it should be able to access git via ssh.

@magento-engcom-team magento-engcom-team added the Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed label Oct 1, 2017
@orlangur
Copy link
Contributor

orlangur commented Oct 6, 2017

I believe composer/composer#3542 (comment) should do the trick.

@magento-engcom-team
Copy link
Contributor

@spiegl we are closing this issue due to inactivity. If you'd like to update it, please reopen the issue.

@allumanatu
Copy link

I have the same problem... Did anyone find a fix for that?

@orlangur
Copy link
Contributor

orlangur commented Jun 4, 2018

@allumanatu did you try my suggestion?

@jordanbergerman
Copy link

I'm facing this exact issue too and tried @orlangur 's suggestion, however it did not work for me. Really frustrating as it is the first time I've used github via composer and it has caused all of this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed non-issue Progress: needs update
Projects
None yet
Development

No branches or pull requests

6 participants