Fastlane match cannot connect over SSH Fastlane match cannot connect over SSH jenkins jenkins

Fastlane match cannot connect over SSH


Try first the same operation with Jenkins launched in an environment where the variable GIT_SSH_COMMAND is set to "ssh -vvv": that will give you full traces when Git tries and clone with SSH URL.

The OP mmvie confirms in the comments:

Adding verbose logging to SSH revealed Jenkins was ran as sudo.
Running Jenkins not as sudo and pointing to the correct SSH keys resolved the issue.


Other possibilities:

fastlane issue 5473 mentions the known_hosts issue, but if the remote server fingerprint is already added (assuming your Jenkins is running with the same account as your own shell session), then check if your private key is passphrase-protected:

FWIW, when I ssh-add -D and then run fastlane certs (which runs match), I get the exact same behavior. It hangs on "Cloning remote git repo..." That's expected behavior. 'ssh-add' fixes things.

Same in fastlane issue 7482:

Figured it out...was on a new box and hadn't added my key to ssh-agent.

ssh-add -K ~/.ssh/id_rsa

Other possibility: fastlane issue 11732:

I'm running into this on CircleCi 2.0 as well

Setting this in my environment configuration on Circle 2.0 helps

environment:  TERM: xterm-256color

So check your $TERM environment variable value.


I solved a similar issue with

ssh-keyscan myserver.com >> ~/.ssh/known_hosts


I have frozen task on Circle CI on fastlane match step. The reason was I ran 'checkout' step on linux and get it throw workspace to macos vm. So the 'checkout' command was newer setted up on macos machine and ssh didn't know a bitbucket host name.

It was solved by adding extra 'checkout' command to macos env job. It take a little time because everything is synced by workspace.