Connect Bitrise with "Rebuild with Remote Access" button
bash:
set BITRISE_PORT = 3.tcp.ngrok.io
set BITRISE_HOST = 21784
set BITRISE_PASSWORD = password
fish shell:
set BITRISE_PORT = 3.tcp.ngrok.io
set BITRISE_HOST = 21784
set BITRISE_PASSWORD = password
Note: Replace values, use URL and PORT from the command provided by Bitrise:
ssh -o StrictHostKeyChecking=no vagrant@1.tcp.ngrok.io -p 29758
In this example1.tcp.ngrok.io
will be theBITRISE_HOST
and29758
it is theBITRISE_PORT
![[Frame 1 1.jpg]]
mkdir cert; cd cert; \
openssl genrsa -out bitrise.key 2048; \
openssl req -new -key bitrise.key -out CSR.csr
rm -rf ~/Downloads/bitrise-cert
mkdir ~/Downloads/bitrise-cert; \
cd ~/Downloads/bitrise-cert; \
sshpass -p "$BITRISE_PASSWORD" scp -o StrictHostKeyChecking=no -P $BITRISE_PORT vagrant@$BITRISE_HOST:/Users/vagrant/cert/CSR.csr ~/Downloads/bitrise-cert/CSR.csr
Open Apple Developer Certificates page and create Development and Distribution certificates using CSR.csr file that is just downloaded ~/Downloads/bitrise-cert/ on your computer
Download .cer
files from the Apple Developer, and place them in ~/Downloads/bitrise-cert
folder.
Now run this command to upload those certificates to the Bitrise Remote machine
sshpass -p "$BITRISE_PASSWORD" scp -o StrictHostKeyChecking=no -P $BITRISE_PORT ~/Downloads/bitrise-cert/development.cer vagrant@$BITRISE_HOST:/Users/vagrant/cert/development.cer; \
sshpass -p "$BITRISE_PASSWORD" scp -o StrictHostKeyChecking=no -P $BITRISE_PORT ~/Downloads/bitrise-cert/distribution.cer vagrant@$BITRISE_HOST:/Users/vagrant/cert/distribution.cer
openssl pkcs12 -export -out distribution.p12 -inkey bitrise.key -in distribution.cer; \
openssl pkcs12 -export -out development.p12 -inkey bitrise.key -in development.cer;
sshpass -p "$BITRISE_PASSWORD" scp -o StrictHostKeyChecking=no -P $BITRISE_PORT vagrant@$BITRISE_HOST:/Users/vagrant/cert/development.p12 ~/Downloads/bitrise-cert/development.p12; \
sshpass -p "$BITRISE_PASSWORD" scp -o StrictHostKeyChecking=no -P $BITRISE_PORT vagrant@$BITRISE_HOST:/Users/vagrant/cert/distribution.p12 ~/Downloads/bitrise-cert/distribution.p12; \
open .
Now you can find .p12 certificates in your ~/Downloads/bitrise-cert folder