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

GPM not reachable on theme creation #1237

Closed
CarpenterBug opened this issue Jan 5, 2017 · 9 comments
Closed

GPM not reachable on theme creation #1237

CarpenterBug opened this issue Jan 5, 2017 · 9 comments
Labels

Comments

@CarpenterBug
Copy link

Hello everyone,

I've just download "Grav Core + Admin Plugin" and everything was working really well until the moment I tried to create a new theme.

I've followed the "Theme Tutorial", installed the DevTools via Admin Plugin without any errors and then, when I run the new-theme command, I get the following error:

GPM not reachable. Please check your internet connection or check the Grav site is reachable

I've searched regarding the GPM error and tried every solution and nothing solved the issue.

Before creating this issue, I've tried to install the DevTools via command line and when it was about to overwrite the installed DevTools, I got the following error:

Preparing to install DevTools [v1.0.4]
|- Downloading package... error
| '- Error while trying to download 'https://github.com/getgrav/grav-plugin-devtools/zipball/1.0.4'
| '-
'- Installation failed or aborted.

Why did I get an error on the command line and nothing on the Dashboard?
This is the reason why I can't create a new theme?

Thank you for help.

@flaviocopes
Copy link
Contributor

You already checked and tried all the possible solutions listed here: https://learn.getgrav.org/troubleshooting/common-problems#cannot-connect-to-the-gpm ?

@TJohnson93
Copy link

TJohnson93 commented Feb 3, 2017

I know this is bordering on old, I have the same issue... Running MacOS with MAMP (Apache, PHP 7.1.0) Also have OpenSSL and Curl enabled. The folder permissions look good as far as I can see drwxr-xr-x.

Any thoughts?

@MadPt Did you have any luck?

@flaviocopes
Copy link
Contributor

@TJohnson93 maybe try setting gpm.method in the system.yaml configuration to fopen first, and then also try setting it to curl.

@TJohnson93
Copy link

@flaviocopes thanks, stupid question, I have the following:

gpm.method:
   type: toggle
   label: PLUGIN_ADMIN.GPM_METHOD
   highlight: auto
   help: PLUGIN_ADMIN.GPM_METHOD_HELP
   options:
       auto: PLUGIN_ADMIN.AUTO
       fopen: PLUGIN_ADMIN.FOPEN
       curl: PLUGIN_ADMIN.CURL

By setting fopen first, is that just moving the fopen: PLUGIN_ADMIN.FOPEN before auto:. If so it seemed to resolve the GPM not reachable error, however, has now resulted in the following:

USER$ bin/gpm install devtools

GPM Releases Configuration: Stable



Preparing to install DevTools [v1.0.4]
  |- Downloading package...    error                             
  |  '- Error while trying to download 'https://getgrav.org/download/plugins/devtools/1.0.4'
  |  '- 
  '- Installation failed or aborted.


Clearing cache

Cleared:  /Users/USER/Sites/projects/provincia_theme/cache/compiled/*

Touched: /Users/USER/Sites/projects/provincia_theme/user/config/system.yaml

@TJohnson93
Copy link

@flaviocopes Thanks for all the help... I was looking in the wrong file...

For anyone else that is new to Grav development and running into this issue, it's the system.yaml file that is found in user > config > system.yaml. And you add the following:

gpm:
  verify_peer: true
  method: curl

This worked for me and I was able to install the dev-tools and run the new-theme function.

@flaviocopes
Copy link
Contributor

By default if fopen() is available (allow_url_fopen is enabled in the PHP config) and the open_basedir PHP restriction is not enabled, Grav tries using it.

Falls back to curl if these requirements are not met, OR if you explicitly specify it in gpm.method. (or in the System configuration in Admin)

So looks like fopen was enabled, but not working for some reason. Maybe the server PHP error log has some hint.

@rhukster
Copy link
Member

Closing to due to inactivity

@NicoHood
Copy link
Contributor

NicoHood commented Nov 5, 2020

I currently ran into the same issue. I am having problems creating a new plugin:

$ bin/plugin devtools new-plugin
Enter Plugin Name: test
 GPM not reachable. Please check your internet connection or check the Grav site is reachable 

The command takes a lot of time to execute and prompt me for the name. Then after hitting enter the error pops up instantly.

I also noticed that the grav admin panel is very slow and does not show any plugin updates. I tested this with a working website, everything locally.

Does the new-plugin command require internet connection? I do have internet connection, but maybe something is wrong with it. If so, I am wondering why such a simple command would require external resources.

bin/gpm index Does not show any package. curl -I https://getgrav.org/downloads/plugins.json does return a header.

I can workaround the issue by adding collision_check: false to the devtools setting. It seems the plugin tries to validate against the online repository if a plugin/theme name already exists. However I have no idea why this connection fails.

Oh and curl and openssl is enabled. I am NOT using a proxy. I mean it worked before...

@NicoHood
Copy link
Contributor

NicoHood commented Nov 7, 2020

Today everything is gone. However I think grav should not depend on getgrav.org that heavy.

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

No branches or pull requests

5 participants