Can't deploy - not a valid repository name

I can’t seem to deploy and am running into the following error:

TASK [deploy : Clone project files] *****************************************************
System info:
  Ansible 2.9.14; Darwin
  Trellis version (per changelog): "Remove prestissimo for Composer 2.0 support"
---------------------------------------------------
Cloning into '/www/****_805/public/shared/source'...
fatal:********@github.com for help
Cloning into '/www/****_805/public/shared/source'...
fatal: remote error:
   is not a valid repository name
  Email support@github.com for help
fatal: [kinsta_staging]: FAILED! => {"changed": false, "cmd": "/usr/bin/git clone --origin origin '' /www/****_805/public/shared/source", "rc": 128, "stderr_lines": ["Cloning into '/www/****_805/public/shared/source'...", "fatal: remote error: ", "   is not a valid repository name", "  Email support@github.com for help"], "stdout": "", "stdout_lines": []}

My repository name and branch name are correct and here is my wordpress_sites.yml config for my staging env:

wordpress_sites:
  ****.com:
    site_hosts:
      - canonical: staging.www.****.com
    local_path: ../site # path targeting local Bedrock site directory (relative to Ansible root)
    repo: git@github.com:****/wp.git` # replace with your Git repo URL
    repo_subtree_path: site # relative path to your Bedrock/WP directory in your repo
    branch: main
    multisite:
      enabled: true
    ssl:
      enabled: true
      provider: letsencrypt
    cache:
      enabled: false

I have searched online and tried changing some config, but nothing seems out of place. Any thoughts on what I should try?

In the config you pasted there’s an errant backtick ` at the end of your repo name which could be causing problems

I’ve looked at the URL so many times, and never saw that tilde … thank you.

That error is gone, and I’ve come across this one now:

TASK [deploy : Copy project templates] **************************************************
System info:
  Ansible 2.9.14; Darwin
  Trellis version (per changelog): "Remove prestissimo for Composer 2.0 support"
---------------------------------------------------
AnsibleError: An unhandled exception occurred while templating '{{
wordpress_env_defaults | combine(vault_wordpress_env_defaults | default({}),
project.env | default({}), vault_wordpress_sites[site].env) }}'. Error was a
<class 'ansible.errors.AnsibleFilterError'>, original message: |combine
expects dictionaries, got AnsibleUndefined
failed: [kinsta_staging] (item={'name': '.env config', 'src': 'roles/deploy/templates/env.j2', 'dest': '.env', 'mode': '0600'}) => {"ansible_loop_var": "item", "changed": false, "item": {"dest": ".env", "mode": "0600", "name": ".env config", "src": "roles/deploy/templates/env.j2"}}

If I had to guess, it looks like you’re missing the vault entry for that site in staging? See https://roots.io/docs/trellis/master/wordpress-sites/#passwords-secrets

#  group_vars/staging/vault.yml
vault_wordpress_sites:
  whatever.com:
    admin_password: admin
    env:
      db_password: example_dbpassword
    # etc

It would need to look something like that ^

I am attempting to deploy to a Kinsta staging environment which I have not done in a couple of years. I’ve followed the documentation available here:

I’ve run the deploy command:

ansible-playbook deploy.yml -e env=staging -e site=project.com --limit=kinsta_staging

I am receiving a similar error as posted above:

TASK [deploy : Copy project templates] ********************************************************************************************************************
System info:
  Ansible 2.9.8; Darwin
  Trellis version (per changelog): "Validate that `letsencrypt_contact_emails` is a list"
---------------------------------------------------
AnsibleError: An unhandled exception occurred while templating '{{
wordpress_env_defaults | combine(vault_wordpress_env_defaults | default({}),
project.env | default({}), vault_wordpress_sites[site].env) }}'. Error was a
<class 'ansible.errors.AnsibleFilterError'>, original message: |combine
expects dictionaries, got AnsibleUndefined
failed: [kinsta_staging] (item={u'dest': u'.env', u'src': u'roles/deploy/templates/env.j2', u'name': u'.env config', u'mode': u'0600'}) => {"ansible_loop_var": "item", "changed": false, "item": {"dest": ".env", "mode": "0600", "name": ".env config", "src": "roles/deploy/templates/env.j2"}}

I added my email address to mail.yml and added this to main.yml:

letsencrypt_contact_emails:
  - myemail@domain.com
  - "{{ mail_admin }}" # defined in groups_vars/all/mail.yml

I’m having trouble tracking down what is causing this error. Anyone run into this?

Also, found this and made sure that I am using the correct staging URL that Kinsta provides:

https://discourse.roots.io/t/failed-deploying-from-trellis-to-kinsta/18787/2

Lastly, I should probably mention that I am able to SSH into the Kinsta staging env.

This topic was automatically closed after 42 days. New replies are no longer allowed.