Packagist menggunakan 2 IP 87.98.253.214 dan 144.217.203.53. Akses dari Indonesia selalu diredirect (geo location) ke IP 87.98.253.214 dari beberapa kali testing, akses ke 144.217.203.53 jauh lebih cepat dan stabil. Biar anda mendapatkan IP 144.217.203.53 edit file hosts, di Linux bisa dengan cara menambahkan

144.217.203.53 packagist.org

Untuk memastikan anda sudah mendapatkan IP 144.217.203.53 coba ping ke packagist.org

PING packagist.org (144.217.203.53) 56(84) bytes of data.
64 bytes from packagist.org (144.217.203.53): icmp_seq=1 ttl=51 time=261 ms
64 bytes from packagist.org (144.217.203.53): icmp_seq=2 ttl=51 time=261 ms
64 bytes from packagist.org (144.217.203.53): icmp_seq=3 ttl=51 time=265 ms
64 bytes from packagist.org (144.217.203.53): icmp_seq=4 ttl=51 time=267 ms
64 bytes from packagist.org (144.217.203.53): icmp_seq=5 ttl=51 time=265 ms
 
--- packagist.org ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4003ms
rtt min/avg/max/mdev = 261.243/264.097/267.104/2.265 ms

Test Update Composer

composer update --profile

output

...
...
[170.2MB/63.81s] Writing lock file
[170.2MB/63.81s] Generating autoload files
[170.7MB/63.89s] > Illuminate\Foundation\ComposerScripts::postUpdate
[171.8MB/63.90s] > php artisan optimize
[171.8MB/63.97s] Generating optimized class loader
[171.8MB/64.41s] The compiled services file has been removed.
[172.1MB/64.45s] Memory usage: 172.12MB (peak: 209.01MB), time: 64.45s

dari sebelumnya 30 menit belum selesai, sekarang 64.45 detik composer sudah selesai di install/update.

Solusi lain

Jalankan perintah composer diagnose

composer diagnose
# output perintah diatas
Checking composer.json: OK
Checking platform settings: OK
Checking git settings: OK
Checking http connectivity to packagist: OK
Checking https connectivity to packagist: OK
Checking github.com rate limit: OK
Checking disk free space: OK
Checking pubkeys: 
Tags Public Key Fingerprint: 57815BA2 7E54DC31 7ECC7CC5 573090D0  87719BA6 8F3BB723 4E5D42D0 84A14642
Dev Public Key Fingerprint: 4AC45767 E5EC2265 2F0C1167 CBBB8A2B  0C708369 153E328C AD90147D AFE50952
OK
Checking composer version: OK

Bila muncul error

Checking pubkeys: FAIL
Missing pubkey for tags verification
Missing pubkey for dev verification
Run composer self-update --update-keys to set them up

jalankan composer self-update --update-keys lalu copy paste key dari https://composer.github.io/pubkeys.html

jalankan kembali composer diagnose, lalu ulangi meng-update packages dengan composer

Join the Conversation

1 Comment

Your email address will not be published. Required fields are marked *