Closed jarrodCoombes closed 1 year ago
This is unfortunately a composer+GH issue, not a Snipe-IT issue. I assume you have done composer config -g github-oauth.github.com XXXXXXXXXXXXXXXXXXXXXXX
(with XXXXX being your token?)
This resource may or may not be helpful: https://www.previousnext.com.au/blog/managing-composer-github-access-personal-access-tokens
All PreviousNext Drupal 8 projects are now managed using Composer. This is a powerful tool, and allows our projects to define both public and private modules or libraries, and their dependencies, and bring them all together. However, a if you require public or private modules which are hosted on GitHub you may run into the API Rate Limits. In order to overcome this, it is recommended to add a GitHub personal access token to your composer configuration. In this blog post, I'll show how you can do this in a secure and manageable way.
(If you have composer installed globally, this process might be a little different versus using composer.phar
though)
How could I tell if it's installed globally?
This also all complicated by the fact that this upgrade needs to be run by the www-data user.
But also, when I manually enter a token that I generate into that prompt, it does not seem to accept it. So what are other people doing to upgrade when they run into this issue?
Oddly, if I paste the url it is trying to download into my browser, in an incognito window, the zip file is downloaded just fine.
Ok, I had to:
/var/www
folder, create a .cache
folder, then set the folder owner/group to www-data (sudo chown -R www-data:www-data .cache
)https://github.com/settings/tokens/new?scopes=repo&description=<description>
and generate a token, I made mine never expire (probably not a good idea, but what the heck).sudo -u www-data composer config -g github-oauth.github.com <token from #3>
in order to store the token in the correct place.sudo -u www-data php upgrade.php
That seems to have run all the way through with no errors. So I am reasonably sure I am completely upgraded now.
Debug mode
Describe the bug
When I run the upgrade for Snipe
php upgrade.php
step 8 (Composer dependancies) gets to a point and asks me to enter a token to download some part of the update. When I generate both a public and private access token, it does not seem to accept these and still prompts for the token.I am not sure if this is just me doing something wrong, so it may not be a bug. But I would sure love to fix this once and for all so that I can upgrade Snipe when I need to without it taking hours and days to accomplish.
Is this expected behaviour? Or am I just special somehow?
Reproduction steps
1.Run php upgrade.php 2.Get stuck at the token entry dialogue 3. ...
Expected behavior
It should upgrade with no prompting for a token.
Screenshots
No response
Snipe-IT Version
6.0.5
Operating System
Ubuntu Server 20.04.5 LTS
Web Server
Apache 2
PHP Version
7.4.3
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
Additional context
No response