Friday, October 28, 2022

Debian on WSL

wsl --install -d debian

wget --no-check-certificate  https://packages.microsoft.com/config/debian/11/packages-microsoft-prod.deb -O packages-microsoft-prod.deb

sudo dpkg -i packages-microsoft-prod.deb

sudo apt-get update --fix-missing

sudo apt-get install -f #install with dependencies

sudo apt-get update

sudo apt-get install -y dotnet-sdk-5.0


but this not enoght, because I need to run code in a vm from github. to setup certificate:

sudo apt-get install --yes software-properties-common
sudo update-ca-certificates
sudo apt-get install socat -y
socat TCP4-LISTEN:4443,reuseaddr,fork PROXY:squidhost:github.com:443,proxyport=3128
openssl s_client -showcerts -servername github.com -connect github.com:443 </dev/null 2>/dev/null | sed -n -e '/BEGIN\ CERTIFICATE/,/END\ CERTIFICATE/ p'  > github.com.pem
cat github.com.pem | sudo tee -a /etc/ssl/certs/ca-certificates.crt
git config --global http."https://github.com.pem/".sslCAInfo ~/github.com.pem
git config --global http.sslverify false
export GIT_SSL_NO_VERIFY=true

Then this error is gone:

fatal: unable to access 'github.com/...': server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none

thank you for original post

No comments:

debug magazine archive

  71 jounals still available on issuu with great story of netlabels time.  debug_mag Publisher Publications - Issuu