Grav-plugin-admin: The connection to the GPM cannot be established.

Created on 4 Jan 2018  路  7Comments  路  Source: getgrav/grav-plugin-admin

I am a newbie with GRAV and just made a fresh installation. Now I wanted to follow the theme tutorial and install the devtools plugin as first step. When I go to +add on the plugins page in admin panel it gives the error message "The connection to the GPM cannot be established". Same with the templates section.... What went wrong?

question

Most helpful comment

Stumbled upon this, since I had similar error message: The connection to the GPM cannot be established

I develop, test my site on Windows using WAMPserver. I have read the relevant help section regarding gpm and tried the recommendations but even after setting verify_peer: false was not helping.

Except the last one, running the bin/gpm index command and its output was really helpful, since it immediately showed me the reason why gpm was failing. I use the recommended mysysgit for Windows terminal to run terminal commands.

The problem was a syntax error, one of my inherited theme yaml file contained an unwanted indentation, like this.

[RuntimeException] Failed to read blueprints.yaml: A YAML file cannot contain tabs as indentat ion at line 7 (near " ").

After correcting this, I was immediately able to list plugins & themes both in terminal and in Grav Admin.

@studioamore I don't know what is your problem with gpm, but I noticed that you are trying to run bin/gpm index as a Linux system binary. That bin directory is not the Linux specific binary folder but it is relative to the Grav installation's. Either you should add grav-install's \bin path to your $PATH environment variable to access it system-wide or rather just simply run the gpm command from your \bin folder relative to your Grav installation directory, where it is located.

All 7 comments

First of all: sorry I did not found this on my own (I actually thought I searched for this in your wonderful documentation).

  • OpenSSL and cURL support are enabled
  • in user/config/config.yaml it says in the gpm section
    gpm: releases: stable verify_peer: true
  • permissions are all on 775
  • with terminal I ran the 'bin/gpm index' but did not get a result?
    bash-4.3$ cd admin bash-4.3$ ls CHANGELOG.md README.md cache index.php tmp CODE_OF_CONDUCT.md assets composer.json logs user CONTRIBUTING.md backup composer.lock robots.txt vendor LICENSE.txt bin images system webserver-configs bash-4.3$ bin/gpm index bash: bin/gpm: /usr/bin/env: bad interpreter: No such file or directory

The installation is not in the complete root folder of my webspace, but on a subdomain. Might that be a problem?

Otherwise I have no idea, why gpm is not working...

Thanks for your quick help!

Stumbled upon this, since I had similar error message: The connection to the GPM cannot be established

I develop, test my site on Windows using WAMPserver. I have read the relevant help section regarding gpm and tried the recommendations but even after setting verify_peer: false was not helping.

Except the last one, running the bin/gpm index command and its output was really helpful, since it immediately showed me the reason why gpm was failing. I use the recommended mysysgit for Windows terminal to run terminal commands.

The problem was a syntax error, one of my inherited theme yaml file contained an unwanted indentation, like this.

[RuntimeException] Failed to read blueprints.yaml: A YAML file cannot contain tabs as indentat ion at line 7 (near " ").

After correcting this, I was immediately able to list plugins & themes both in terminal and in Grav Admin.

@studioamore I don't know what is your problem with gpm, but I noticed that you are trying to run bin/gpm index as a Linux system binary. That bin directory is not the Linux specific binary folder but it is relative to the Grav installation's. Either you should add grav-install's \bin path to your $PATH environment variable to access it system-wide or rather just simply run the gpm command from your \bin folder relative to your Grav installation directory, where it is located.

Seeing the same error when trying to add themes or plugins following a fresh install unzipped from https://getgrav.org/download/core/grav-admin/latest and then chowned to www-data.

  • [x] OpenSSL support: enabled
  • [x] cURL support: enabled
  • [x] Not behind a proxy
  • [x] Ownership is www-data:www-data; PHP-FPM runs as this user
  • [x] Permissions are 755 for directories and binaries, 644 for files
  • [x] curl -IL getgrav.org results in HTTP/1.1 200 OK
  • [x] Verify peer is currently disabled anyway
  • [x] ./bin/gpm index from Grav root returns 235 plugins and 86 themes, no errors

I'm running Grav inside a Caddy Docker container. For reference, my Caddyfile: https://pastebin.com/Hhxb7Ayd

Caddy is sending FastCGI requests to an official php:fpm-alpine container with gd and zip installed and no other configuration.

@whitestrake Did you ever get this work? I was looking at running Grav under docker.

@sww314 No, unfortunately. I was hoping the developer (@rhukster ?) could provide some additional troubleshooting steps, or perhaps request some more information to help narrow down the issue, but I'm not sure where to look from here on my own.

This may be fixed in Admin 1.10 as we switched away from our own curl/fopen logic.

Was this page helpful?
0 / 5 - 0 ratings