login to WPEngine Git Push with Tower Git

870 Views Asked by At

I've set up my developer name and public key on WPEngine's Git Push dashboard. i'm able to connect via the terminal:

$ ssh [email protected] info
    hello <my wpengine dev name>
    R W production/my_installname
    R W staging/my_installname

so it all looks to be set up correctly.

but when trying to connect with Tower Git client, i'm getting the error:

Can't Authenticate with Server Authentication with the server failed. Please verify your username and password.

for the Tower login, i'm using:

Remote URL: [email protected]:production/my_repo.git

Authentication: Private Key

Username: (i tried my dev name and my email address, neither worked)

SSH: ~/.ssh/id_rsa (which i generated for WPEngine, and uploaded the associated public key)

i've tried all different combinations of usernames and URLs, etc. nothing is working. any ideas? thank you!

2

There are 2 best solutions below

1
Samuel Herzog On BEST ANSWER

Prerequisite

From your question I gather you're on macOS, most likely macOS 10.12 which stopped autoloading SSH keys into the keychain and creating this situation. However, the Walkthrough is valid for all OS/Tower versions.

Use Tower's Service Interface to prepare SSH key loading

Navigate to Tower's service view with Cmd+Ctrl+S.
In the bottom left click the + to choose "Add Custom Server"

As authentication information enter

Server name: ssh://[email protected]
Choose SSH Key authentication and enter your credentials

Cloning Repositories

Should now work as expected

Existing Repositories - make sure they're linked to your Service

Open your repository in Tower, click your remote in the sidebar (most likely origin) Hover the Fetch URL to reveal the "Edit" button Press it and make sure your Custom Service is selected in this dialog Test by clicking "Fetch"

You can find out more about connecting/authenticating the official Tower help:
https://www.git-tower.com/help/mac/manage-hosting-services/manage-ssh-keys
https://www.git-tower.com/help/mac/remote-repositories/connect-authenticate

Disclaimer: I'm with the support team for Tower

0
caudill On

I came across this while trying to add my wpengine repositories to Tower and had to try a few different URLs before getting the correct one. The connection is specific to the repository not the account, unlike in the terminal.

This URL scheme worked: ssh://[email protected]/production/repo.git

The username in the form field is git and you select the correct SSH key in the dropdown (just as Samuel stated above). Obviously, the only difference is adding the path to the repo; but I tried a few options with port numbers and different URL schemes that didn't work so I thought I'd post to save anyone else the hassle of figuring it out in 2019.