Apocrypha
I have run into an error trying to use the neocities CLI client to push an update to multiple files in one go.
I’m running ubuntu on wsl, which is probably the reason why this doesn’t work out of the box.
$ neocities push _site
Please login to get your API key:
sitename: timeskipmiku
password: ••••••••••••••
/home/programmer/.rvm/gems/ruby-3.0.0/gems/httpclient-fixcerts-2.8.5/lib/httpclient/ssl_socket.rb:103:in ` connect': SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (unable to get local issuer certificate) (OpenSSL::SSL::SSLError)
from /home/programmer/.rvm/gems/ruby-3.0.0/gems/httpclient-fixcerts-2.8.5/lib/httpclient/ssl_socket.rb:103:in `ssl_connect'
from /home/programmer/.rvm/gems/ruby-3.0.0/gems/httpclient-fixcerts-2.8.5/lib/httpclient/ssl_socket.rb:41:in ` initialize'
from /home/programmer/.rvm/gems/ruby-3.0.0/gems/httpclient-fixcerts-2.8.5/lib/httpclient/ssl_socket.rb:26:in `new'
from /home/programmer/.rvm/gems/ruby-3.0.0/gems/httpclient-fixcerts-2.8.5/lib/httpclient/ssl_socket.rb:26:in ` create_socket'
from /home/programmer/.rvm/gems/ruby-3.0.0/gems/httpclient-fixcerts-2.8.5/lib/httpclient/session.rb:752:in `block in connect'
from /home/programmer/.rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/timeout.rb:97:in ` block in timeout '
from /home/programmer/.rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/timeout.rb:107:in `timeout'
from /home/programmer/.rvm/gems/ruby-3.0.0/gems/httpclient-fixcerts-2.8.5/lib/httpclient/session.rb:748:in ` connect'
from /home/programmer/.rvm/gems/ruby-3.0.0/gems/httpclient-fixcerts-2.8.5/lib/httpclient/session.rb:511:in `query'
from /home/programmer/.rvm/gems/ruby-3.0.0/gems/httpclient-fixcerts-2.8.5/lib/httpclient/session.rb:177:in ` query'
from /home/programmer/.rvm/gems/ruby-3.0.0/gems/httpclient-fixcerts-2.8.5/lib/httpclient.rb:1247:in `do_get_block'
from /home/programmer/.rvm/gems/ruby-3.0.0/gems/httpclient-fixcerts-2.8.5/lib/httpclient.rb:1024:in ` block in do_request'
from /home/programmer/.rvm/gems/ruby-3.0.0/gems/httpclient-fixcerts-2.8.5/lib/httpclient.rb:1138:in `protect_keep_alive_disconnected'
from /home/programmer/.rvm/gems/ruby-3.0.0/gems/httpclient-fixcerts-2.8.5/lib/httpclient.rb:1019:in ` do_request'
from /home/programmer/.rvm/gems/ruby-3.0.0/gems/httpclient-fixcerts-2.8.5/lib/httpclient.rb:861:in `request'
from /home/programmer/.rvm/gems/ruby-3.0.0/gems/httpclient-fixcerts-2.8.5/lib/httpclient.rb:744:in ` get'
from /home/programmer/.rvm/gems/ruby-3.0.0/gems/neocities-0.0.18/lib/neocities/client.rb:88:in `get'
from /home/programmer/.rvm/gems/ruby-3.0.0/gems/neocities-0.0.18/lib/neocities/client.rb:38:in ` key'
from /home/programmer/.rvm/gems/ruby-3.0.0/gems/neocities-0.0.18/lib/neocities/cli.rb:68:in `run'
from /home/programmer/.rvm/gems/ruby-3.0.0/gems/neocities-0.0.18/bin/neocities:4:in ` <top ( required)> '
from /home/programmer/.rvm/gems/ruby-3.0.0/bin/neocities:23:in `load'
from /home/programmer/.rvm/gems/ruby-3.0.0/bin/neocities:23:in ` <main>'
Fix:
ls -l /etc/ssl/certs/ca-certificates.crt
sudo apt update
sudo apt upgrade
sudo apt-get install -y ca-certificates
and in your ~/.bash_profile
export SSL_CERT_DIR = /etc/ssl/certs
export SSL_CERT_FILE = /etc/ssl/certs/ca-certificates.crt
and then
source ~/.bash_profile
˦˫