|
|
@ -252,6 +252,62 @@ cd swarmlab-hybrid |
|
|
|
---- |
|
|
|
**** |
|
|
|
|
|
|
|
== Fix "x509: certificate signed by unknown authority" issue |
|
|
|
|
|
|
|
On Error: |
|
|
|
|
|
|
|
[source,sh] |
|
|
|
---- |
|
|
|
Get https ://registry.vlabs.uniwa.gr:5080/v2/: x509: certificate |
|
|
|
|
|
|
|
Pulling ... |
|
|
|
ERROR: Get https://registry.vlabs.uniwa.gr:5080/v2/: x509: certificate signed by unknown authority |
|
|
|
---- |
|
|
|
|
|
|
|
run |
|
|
|
|
|
|
|
[source,sh] |
|
|
|
---- |
|
|
|
sudo su |
|
|
|
touch set-ca.sh |
|
|
|
---- |
|
|
|
|
|
|
|
copy-paste lines |
|
|
|
|
|
|
|
[source,sh] |
|
|
|
---- |
|
|
|
registry_address=hub.swarmlab.io |
|
|
|
registry_port=5443 |
|
|
|
mkdir -p /etc/docker/certs.d/$registry_address:$registry_port |
|
|
|
openssl s_client -showcerts -connect $registry_address:$registry_port < /dev/null | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > /etc/docker/certs.d/$registry_address:$registry_port/ca.crt |
|
|
|
|
|
|
|
registry_port=5480 |
|
|
|
mkdir -p /etc/docker/certs.d/$registry_address:$registry_port |
|
|
|
openssl s_client -showcerts -connect $registry_address:$registry_port < /dev/null | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > /etc/docker/certs.d/$registry_address:$registry_port/ca.crt |
|
|
|
---- |
|
|
|
|
|
|
|
exec file |
|
|
|
|
|
|
|
[source,sh] |
|
|
|
---- |
|
|
|
sudo bash ./set-ca.sh |
|
|
|
---- |
|
|
|
|
|
|
|
== Fix "server certificate verification failed. CAfile: ..." |
|
|
|
|
|
|
|
copy-paste lines |
|
|
|
|
|
|
|
[source,sh] |
|
|
|
---- |
|
|
|
aot-get update |
|
|
|
apt-get install --reinstall ca-certificates |
|
|
|
mkdir -p /usr/local/share/ca-certificates/swarmlab |
|
|
|
echo -n | openssl s_client -showcerts -connect git.swarmlab.io:3000 2>/dev/null | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > /usr/local/share/ca-certificates/swarmlab/ca.crt |
|
|
|
update-ca-certificates |
|
|
|
git config --global http.sslCAinfo /etc/ssl/certs/ca-certificates.crt |
|
|
|
---- |
|
|
|
|
|
|
|
exec file |
|
|
|
|
|
|
|
|
|
|
|
== start/stop service |
|
|
|