ali_254 Posted October 6, 2022 Share Posted October 6, 2022 (edited) hi , i want update composer but I receive this message: Quote Cloning failed using an ssh key for authentication, enter your GitHub credentials to access private repos When working with _public_ GitHub repositories only, head to https://github.com/settings/tokens/new?scopes=&description=Composer+on+DESKTOP-C3HMN8R+2022-10-06+1038 to retrieve a token. This token will have read-only permission for public information only. When you need to access _private_ GitHub repositories as well, go to https://github.com/settings/tokens/new?scopes=repo&description=Composer+on+DESKTOP-C3HMN8R+2022-10-06+1038 Note that such tokens have broad read/write permissions on your behalf, even if not needed by Composer. Tokens will be stored in plain text in "C:/Users/ali/AppData/Roaming/Composer/auth.json" for future use by Composer. For additional information, check https://getcomposer.org/doc/articles/authentication-for-private-packages.md#github-oauth i register a token in github and enter in command prompt but receive this message: curl error 28 while downloading https://api.github.com/: Operation timed out after 10004 milliseconds with 0 out of 0 bytes received Please give a solution. Thank you Edited October 6, 2022 by ali_254 Quote Link to comment Share on other sites More sharing options...
requinix Posted October 6, 2022 Share Posted October 6, 2022 Operation timed out Try again? 1 Quote Link to comment Share on other sites More sharing options...
ali_254 Posted October 6, 2022 Author Share Posted October 6, 2022 Just now, requinix said: Operation timed out Try again? Yes, I tried several times. Is there another way to update the package without using the terminal? Due to the spread of protests in Iran, the internet is severely limited and filtered, and I have to use a VPN. If you have a solution, please tell. Thanks Quote Link to comment Share on other sites More sharing options...
requinix Posted October 7, 2022 Share Posted October 7, 2022 3 hours ago, ali_254 said: Is there another way to update the package without using the terminal? Composer needs to do other work besides just download from GitHub. If you can download it yourself manually then you should be able to put it on your computer somewhere and tell Composer to read from it instead of GitHub. I forget the exact method but I believe you put a custom "repository" in your composer.json. 1 Quote Link to comment Share on other sites More sharing options...
maxxd Posted October 7, 2022 Share Posted October 7, 2022 It's a path type repository. You can also set up a github repository as a composer source, which may actually be what the OP is discussing. 1 Quote Link to comment Share on other sites More sharing options...
ali_254 Posted October 7, 2022 Author Share Posted October 7, 2022 I use these packages: { "name": "laravel/laravel", "type": "project", "description": "The Laravel Framework.", "keywords": ["framework", "laravel"], "license": "MIT", "require": { "php": "^7.3|^8.0", "bumbummen99/shoppingcart": "^4.2", "carlos-meneses/laravel-mpdf": "^2.1", "fruitcake/laravel-cors": "^2.0", "guzzlehttp/guzzle": "^7.0.1", "hekmatinasser/verta": "^2.1", "intervention/image": "^2.7", "laravel/framework": "^8.75", "laravel/sanctum": "^2.11", "laravel/tinker": "^2.5" }, "require-dev": { "barryvdh/laravel-debugbar": "^3.6", "facade/ignition": "^2.5", "fakerphp/faker": "^1.9.1", "laravel/sail": "^1.0.1", "mockery/mockery": "^1.4.4", "nunomaduro/collision": "^5.10", "phpunit/phpunit": "^9.5.10" }, "autoload": { "psr-4": { "App\\": "app/", "Database\\Factories\\": "database/factories/", "Database\\Seeders\\": "database/seeders/" } }, "autoload-dev": { "psr-4": { "Tests\\": "tests/" } }, "scripts": { "post-autoload-dump": [ "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", "@php artisan package:discover --ansi" ], "post-update-cmd": [ "@php artisan vendor:publish --tag=laravel-assets --ansi --force" ], "post-root-package-install": [ "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" ], "post-create-project-cmd": [ "@php artisan key:generate --ansi" ] }, "extra": { "laravel": { "dont-discover": [] } }, "config": { "optimize-autoloader": true, "preferred-install": "dist", "sort-packages": true }, "minimum-stability": "dev", "prefer-stable": true } I have access to GitHub. Laravel itself has a large number of packages. Do I have to download all the desired packages individually? Quote Link to comment Share on other sites More sharing options...
ali_254 Posted October 7, 2022 Author Share Posted October 7, 2022 I removed the mpdf package in composer.json...Composer has been successfully updated. Now it is only with the problem with mpdf Quote Link to comment Share on other sites More sharing options...
requinix Posted October 7, 2022 Share Posted October 7, 2022 If you want to use Laravel for something then you install just laravel/laravel and Composer will get the other dependencies - unless it can't reach GitHub in which case yes, you have to download all of those separately, and then download all of their dependencies, and so on. That is not going to be fun. And what about mpdf? 1 Quote Link to comment Share on other sites More sharing options...
maxxd Posted October 7, 2022 Share Posted October 7, 2022 You're saying that carlos-meneses/laravel-mpdf is timing out? Maybe it was a glitch with packagist - it's doing fine here. There's only two additional packages it looks like. Now that you've removed it from the composer.json file, have you tried manually requiring it with `composer require carlos-meneses/laravel-mpdf`? 1 Quote Link to comment Share on other sites More sharing options...
ali_254 Posted October 8, 2022 Author Share Posted October 8, 2022 23 hours ago, maxxd said: You're saying that carlos-meneses/laravel-mpdf is timing out? Maybe it was a glitch with packagist - it's doing fine here. There's only two additional packages it looks like. Now that you've removed it from the composer.json file, have you tried manually requiring it with `composer require carlos-meneses/laravel-mpdf`? I receive this message Cloning failed using an ssh key for authentication, enter your GitHub credentials to access private repos Quote Link to comment Share on other sites More sharing options...
ali_254 Posted October 9, 2022 Author Share Posted October 9, 2022 Quote have you tried manually requiring it with `composer require carlos-meneses/laravel-mpdf`? Yes, but I got this error: Cloning failed using an ssh key for authentication, enter your GitHub credentials to access private repos Quote Link to comment Share on other sites More sharing options...
maxxd Posted October 9, 2022 Share Posted October 9, 2022 It's not a private repository and the composer.json file you've posted doesn't define any additional repository sources, so I'm not really sure why it's throwing that error at you to be honest. 1 Quote Link to comment Share on other sites More sharing options...
ali_254 Posted October 20, 2022 Author Share Posted October 20, 2022 On 10/9/2022 at 4:14 PM, maxxd said: It's not a private repository and the composer.json file you've posted doesn't define any additional repository sources, so I'm not really sure why it's throwing that error at you to be honest. I have this problem with the "composer require mongodb/mongodb" package as well. Internet in Iran is severely limited. I really don't know what to do. No package can be installed with Composer.😡😡 Quote Link to comment Share on other sites More sharing options...
ali_254 Posted October 21, 2022 Author Share Posted October 21, 2022 I deleted the composer and reinstalled it. The problem is solved! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.