-
Notifications
You must be signed in to change notification settings - Fork 20
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
PHP Fatal Error on listing packages #59
Comments
If I use for example: things works as expected, result is:
|
Could you try adding a personal access token https://github.com/settings/tokens (scope: repo: public_repo Access public repositories) and then Edit: or you probably know that and just want the PHP fatal trapped?!? |
Thank you, I was trying to fix the error, I didn't know how to solve it and your solution worked for me. Anyway, I was saying despite my error, I think wp-cli should contemplate this case for not giving PHP Fatal Error, instead a catched Warning. My last question is: Is necessary then, have a github account + token in order to make this library work? Thank you. |
Agreed!
I think if you use the ssh
instead and see if that works for you? |
Library is giving me errors constantly about ssh git@github.com. But it's ok, I will try to make it work. |
Okay ta, I did notice last time I looked that Composer uses It would be good to come up with a definitive answer that can be used in error messages and in doc... |
Thank you for your answer, thats exactly what is happening. Even if I delete I'm annoyed because when I started with wp-cli, everything worked perfect, and now I don't know what changed (Tried to "restore to initial mode" deleting all that folders etc but didnt works). I will looking into this problem this days and hopefully will bring a solution. Thanks. |
In my research I discovered that command: and this URL is giving me:
Then sometimes I can list my packages and sometimes cannot. Is this the correct behaviour of the wp-cli? Thank you. Edit: More insight, Is giving me:
|
Ah you're getting rate limiting, then this does require the
Well that particular issue is out of wp-cli's hands, and should be workaroundable using It does make it awkward to test whether using the https url rather than the ssh url would allow one to not have to have a token. Do you have particular circumstances where needing to set up a token is not practical or convenient? |
Setting a token is very unpractical and inconvenient if I want to make an application using wp-cli that is replicated in a lot of servers analyzing wordpress installations. I mean, I dont want to create a github account just for this, and of course I dont want to use my personal github account for this. In adittion, what's the point in connecting to github API when I just want to list my packages that I installed locally? I don't get it. I think this approach is more interesting: Result is:
|
The reason it's doing it is to check for updates. It's also why it's so slow. Maybe a package list option to suppress this would be worth having? |
Well, that will be the perfect solution I think. Anyway I see that more as a feature than a bug fixed. I mean, if you want to check for updates (and this will be the default option I think) but API calls limit is reached you should control it. |
Yes, it would be a new feature, with a separate new issue. |
Hi,
Running this command:
./wp-cli.phar package list
Im having this PHP Fatal Error:
The thing is I dont have permission to execute this line
git clone --mirror 'git@github.com:wp-cli/admin-command.git' '/home/user/.cache/composer/vcs/git-github.com-wp-cli-admin-command.git/'
, so despite my error I think wp-cli should control the RuntimeException to not give a PHP Fatal Error.The text was updated successfully, but these errors were encountered: