phplaravelcurlcomposer-php

curl error 28 for composer update/install laravel


i searched several sites, several topics in stackoverflow tried several ways to solve it

  1. reinstalled composer
  2. reinstalled xampp
  3. changed IPv6 to IPv4 -> temporary resolved it
  4. tried on another pc -> same network
  5. i took my github token saved it in composer.json and got another error
  6. used vpn as suggested
  7. i cloned laravel in github but when i need update its composer "autoload", i still get same error on randomized subjects sometimes laravel/symfony and so on..
  8. i tried changing php.ini according to Fileinfo not working in Xampp v3.2.1 [duplicate] : first of all there was no ";extension=php_fileinfo.dll" instead i found extension=fileinfo which itself wasnt commented
  9. for its timeout i changed extention_max from 120 to 360 // my ram is 16
  10. im in an online php boot-camp no one else have same error and no one couldnt help me when i asked for help

i am ready to provide more info , maybe i tried a good way in a wrong manner appreciate.

    - Downloading laravel/sail (v1.16.2)
        Failed to download symfony/http-foundation from dist: curl error 28 while downloading https://api.github.com/repos/symfony/http-foundation/zipball/90f5d9726942db69490fe467a3acb5e7154fd555: Operation timed out after 10008 milliseconds with 0 out of 0 bytes received                                                                                                    
        Now trying to download from source
      - Syncing symfony/http-foundation (v6.1.5) into cache
    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+Mom+2022-10-06+2353 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+Mom+2022-10-06+2353
    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/whowe/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
    Token (hidden):

new tries:

as suggested by mr. NicoHaase i reviewed IPv6 Section the result was as below:

Downloading laravel/laravel (v9.3.8) 

Failed to download laravel/laravel from dist: curl error 28 while downloading api.github.com/repos/laravel/laravel/zipball/…: 
Operation timed out after 10005 milliseconds with 0 out of 0 bytes
 received Now trying to download from source

(i can take screenshot of every step i made)

all limits lifted my problem sloved by itself but i think the lost answer was about the proxy (31/10/2022)


Solution

  • Use proxy! if you are in linux:

    export http_proxy='your_proxy'

    export https_proxy='your_proxy'

    then use composer command If using socks5:

    export http_proxy=socks5://ip:port https_proxy=socks5://ip:port

    then use composer command. I guess you're iranian as same as I am