Editing /etc/passwd
won't work in iOS, so in order to change default shell in iOS you need to edit /etc/master.passwd
. You can change root's default shell to bash like this -- root:/smx7MYTQIi2M:0:0::0:0:System Administrator:/var/root:/bin/bash
.
Last active
January 5, 2023 16:59
-
-
Save githubutilities/361ef7e8e2060e9215d8 to your computer and use it in GitHub Desktop.
cURL, git, ssl in Jailbreak iPhone
By default, curl installed through cydia package made by Jay Freeman does not compile with default CA path which makes curl fails for HTTPS connection if not specifying ca file.
# Install curl
apt-get install curl
# Checkout your default ca path using `curl-config`
curl-config --ca
# Download certificate
curl -#o /etc/ssl/certs/cacert.pem http://curl.haxx.se/ca/cacert.pem
# Edit .curlrc
cat >> ~/.curlrc <<EOF
# Uncomment following line to disable curl's certficate verification
#insecure
cacert=/etc/ssl/certs/cacert.pem
cert-type=PEM
EOF
# Test it out
curl -fsSL https://raw.githubusercontent.com/githubutilities/dotfiles/ubuntu/.ubuntu/bootstrap.sh
Normally, without configuring git, we will get following error in Jailbreak iPhone.
git clone https://github.com/githubutilities/dotfiles.git
fatal: unable to access 'https://github.com/githubutilities/dotfiles.git/': SSL certificate problem: unable to get local issuer certificate
Script to fix this problem:
git config --global http.sslCAinfo /etc/ssl/certs/cacert.pem
# or you can write to system level if you want
# in which case git will write to $(prefix)/etc/gitconfig(NOTE: $(prefix) usually is /usr)
git config --system http.sslCAinfo /etc/ssl/certs/cacert.pem
# or editing .gitconfig file
cat >> ~/.gitconfig <<EOF
[http]
sslCAinfo = /etc/ssl/certs/cacert.pem
EOF
# or in worse case, disable git's ssl verification
git config --global http.sslVerify false
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment