-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Failed to retrieve remote Requirements from https://raw.githubuserscontent.com/snipe/snipe-it/master/.upgrade_requirements.json #14826
Comments
👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can. |
This means that your machine got no result when trying to get upgrade info from https://raw.githubusercontent.com/snipe/snipe-it/master/.upgrade_requirements.json
if that works, run php -a (or php.exe -a? not sure about windows php repl)
if you can get the page output (a few lines of json) in a browser on that server but not in that blurb, something is wonky with your php/curl setup. do you have php curl libraries installed? If not, you should get a different error, but here we are. |
I can reach that url fine in a browser. When I run the commands from a command prompt, I get no errors but it doesn't output anything. I have curl installed and working as far as I can tell |
can you run those again, but add this to the bottom?
then post the output in here |
Hello,
Running the php upgrade.php fails to pull the json as it is. However, I can modify the upgrade.php as follows, in the section posted above, and it does pull the requirements correctly and would appear to update normally. This appears to work fine in my test instance after having done a git pull and composer install, I have yet to test production instance. Additionally, I tried the troubleshooting steps above but did not get any output. However, proxy IP and port is listed in the var_dump. Additionally, running the modified version as above in the php console does give the output as well.
|
Here's what
Here's what I get: array(37) { |
Ah, so I see in there
which is So something is funky with SSL on your machine, at least as far as curl is concerned. Github is running digicert certificates there, so it's not some fly-by-night CA with crappy support are you running behind a proxy? That might screw with things if it's not configured in curl. I like @nukeith42 's idea there (thanks!! I always forget about proxies) At any rate, that's where it's failing. Your PHP version is supported by v7, so you can hypothetically skip that check and be OK if git works where curl doesn't (as always, take a backup just in case).... but I am really curious what's going on there. |
I was running it using https but with an IP address, rather than a host name. I've now created and Lets Encrypt wilcard SSL and edited the .env file to point to the hostname rather than the IP address. I can log in fine but still the php upgrade.php command fails unless i skip PHP checks. We're running behind a firewall that has SSL inspection but I've whitelisted the url, so that shouldn't be causing the issue. |
this only has to do with a connection to github.com, so while it's great that you've upgraded your snipe-it site security, it doesn't affect this issue at all. ;) Did you whitelist github.com, or your site URL? |
I believe the issue is a Windows CA issue, mentioned here. I had already updated php to 8.3.8 and my curl version is 8.7, so I did the 'Native CA option' by adding
after line 12 in upgrade.php. Running 'php upgrade.php' will then pass the requirement checks and continue with the upgrade. ...it will then fail on the git pull because of the modified local upgrade.php. Doing a test with the code provided earlier also works by adding the line:
Results in the contents of the .json as well as
for the getinfo. |
…certificates According to curl/curl#12155 and curl/curl@2d63331 Some corporate Windows proxy (mis)configurations don't pass along intermediate certificates in their TLS handshakes, breaking lots of things that don't work around it. This creates a problem in our curl calls when checking for .upgrade_requirements.json, and seems to be the source of errors for a few of our users: #14826 (comment) In this change, we detect when running on windows environments and load the curl option that works around this.
…certificates According to curl/curl#12155 and curl/curl@2d63331 Some corporate Windows proxy (mis)configurations don't pass along intermediate certificates in their TLS handshakes, breaking lots of things that don't work around it. This creates a problem in our curl calls when checking for .upgrade_requirements.json, and seems to be the source of errors for a few of our users: snipe#14826 (comment) In this change, we detect when running on windows environments and load the curl option that works around this.
Debug mode
Describe the bug
I'm getting the same issue as here when trying to upgrade - I'm on v 6.4.2
#14224
Reproduction steps
...
Expected behavior
automated upgrade
Screenshots
No response
Snipe-IT Version
6.4.2
Operating System
Windows
Web Server
IIS
PHP Version
8.1.28
Operating System
No response
Browser
No response
Version
No response
Device
No response
Operating System
No response
Browser
No response
Version
No response
Error messages
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: