Hello All:
So, I am not doing a staging as this is a new environment and we are skipping staging.
However, development works great and I have 2 sites up and running in .test without issue and have been fully developed.
The server provisioning appears to work great. And I am able to SSH into the server using ssh ubuntu@mydomain.com (AWS Install) so all well and machine is accessible and it appears that nginx and everything is installed and ready for deployment.
So:
$ trellis deploy production myfirstsite.com
TASK [deploy : Failed connection to remote repo] *******************************
fatal: [mydomain.com]: FAILED! => {"changed": false, "msg": "Git repo git@github.com:*********/***********.git on branch production cannot be accessed. Please verify the repository/branch are correct
The Repo exists as a private repo and the branch exists. So, it is obviously an SSH issue.
and you have SSH forwarding set up correctly.\nMore info:\n> https://roots.io/trellis/docs/deploys/#ssh-keys\n> https://roots.io/trellis/docs/ssh-keys/#cloning-remote-repo-using-ssh-agent-forwarding\n\nError:\ngit@github.com: Permission denied (publickey).\r\nfatal: Could not read from remote repository.\n\nPlease make sure you have the correct access rights\nand the repository exists.\n"}
So I try:
$ trellis ssh production mydomain.com
Running command => ssh admin@mydomain.com
admin@mydomain.com: Permission denied (publickey).
Error running ssh: exit status 255
My User File from group_vars:
# Documentation: https://roots.io/trellis/docs/ssh-keys/
admin_user: ubuntu
# Also define 'vault_users' (`group_vars/staging/vault.yml`, `group_vars/production/vault.yml`)
users:
- name: "{{ web_user }}"
groups:
- "{{ web_group }}"
keys:
- "{{ lookup('file', '~/.ssh/id_rsa.pub', errors='ignore') }}"
- "{{ lookup('file', '~/.ssh/id_ed25519.pub', errors='ignore') }}"
- https://github.com/tziady.keys
- name: "{{ admin_user }}"
groups:
- sudo
keys:
- "{{ lookup('file', '~/.ssh/id_rsa.pub', errors='ignore') }}"
- "{{ lookup('file', '~/.ssh/id_ed25519.pub', errors='ignore') }}"
- https://github.com/tziady.keys
web_user: web
web_group: www-data
web_sudoers:
- "/usr/sbin/service php{{ php_version }}-fpm *"
I guess the easiest path recreate the instance using admin instead of ubuntu.
Out of curiosity; is there a way to change this in the trellis user configs?