# SSH keys when deploying a site using a private GitLab repo

**URL:** https://discourse.roots.io/t/ssh-keys-when-deploying-a-site-using-a-private-gitlab-repo/4034
**Category:** bedrock
**Tags:** deploys
**Created:** 2015-06-12T21:30:07Z
**Posts:** 6

## Post 1 by @bryandowning — 2015-06-12T21:30:07Z

New to bedrock and ansible. Sorry if this has been covered elsewhere.

I’m going through the steps outlined in: [GitHub - roots/roots-example-project.com: Example Roots stack project (Trellis, Bedrock, Sage)](https://github.com/roots/roots-example-project.com)

I pushed to a private repo on a company-owned GitLab server.

In my production environment config, I have a single Wordpress site with: `repo: git@mygitlabdomain.com:bryan.downing/wp-bedrock.git`

It seems like it would be necessary to manually SSH into the remote server (after the server has been provisioned with server.yml), generate SSH keys for the web user, and add the public key to GitLab for the bryan.downing user.

Is that correct? I feel like there’s some config I’m missing somewhere.

I ran the deploy script, and it hung on `TASK: [deploy | Clone project files]`. I’m assuming it hung on a password prompt.

---

## Post 2 by @fullyint — 2015-06-12T21:44:40Z

See if this has the info you need:

> **[roots/trellis](https://github.com/roots/trellis/wiki)**
>
> trellis - Ansible playbooks for a WordPress LEMP stack

---

## Post 3 by @swalkinshaw — 2015-06-12T23:41:06Z

You just need to get **your** public key on the server on the `web` user (see link that @fullyint posted). After that SSH forwarding handles the rest (which you obviously need working).

[https://developer.github.com/guides/using-ssh-agent-forwarding/](https://developer.github.com/guides/using-ssh-agent-forwarding/)

---

## Post 4 by @bryandowning — 2015-06-16T18:50:46Z

Wow, I swear I’ve read that wiki page. I completely missed the info about connecting to private repos. Thanks!

---

## Post 5 by @swalkinshaw — 2015-06-16T19:56:14Z

Not sure you did. I added it after you posted this :smile:

---

## Post 6 by @kalenjohnson — 2015-06-16T20:15:17Z

Cheater…
