How do you use template sync?

Solution In Progress - Updated -

Issue

  • As per the guide I have created key and added to azure devops environment.
https://access.redhat.com/documentation/en-us/red_hat_satellite/6.4/html/content_management_guide/synchronizing_templates_with_git
  • I can pull the templates as foreman user but when I run curl command it looks as if git_user is satadmin where it needs to be template_user in our case.
  • Is there a place where we can configure user for templatesync.
  • I don't see anything in administer -> settings -> templacesync

  • Directly cloning the git repo works

# sudo su - foreman -s /bin/bash
-bash-4.2$ ls -l .ssh/*
-rw-r--r--. 1 foreman foreman  124 Jun  4 13:01 .ssh/config
-rw-------. 1 foreman foreman 1675 Jun  4 12:57 .ssh/id_rsa
-rw-------. 1 foreman foreman  404 Jun  4 12:57 .ssh/id_rsa.pub
-rw-r--r--. 1 foreman foreman  405 Jun  4 11:04 .ssh/known_hosts

$ cat .ssh/config
Host ssh.dev.azure.com
        VerifyHostKeyDNS no
        ProxyCommand /bin/nc --proxy proxy.example.com:8080 %h %p

-bash-4.2$ cd /tmp
-bash-4.2$ /bin/git clone ssh://git@ssh.dev.azure.com/v3/example/template/satellite-templates
Cloning into 'satellite-templates'...
remote: Azure Repos
remote: Found 3 objects to send. (2 ms)
Receiving objects: 100% (3/3), done.
-bash-4.2$ ls -ld /tmp/satellite-templates/
drwxrwxr-x. 3 foreman foreman 33 Jun  4 13:23 /tmp/satellite-templates/
  • But when I run the curl command it appears to be communicating with git repo using satadmin user.
# curl -H "Accept:application/json,version=2" -H "Content-Type:application/json" -u satadmin:XXX -k https://satellite.example.com/api/v2/templates/export -X POST
{"message":{"error":"git clone \"--\" \"ssh://"ssh://git@ssh.dev.azure.com/v3/example/template/satellite-templates\" \"/tmp/d20190604-6661-136bld0\"  2\u003e\u00261:Cloning into '/tmp/d20190604-6661-136bld0'...\nwrite: Broken pipe\r\nfatal: Could not read from remote repository.\n\nPlease make sure you have the correct access rights\nand the repository exists.","warning":null,"repo":""ssh://git@ssh.dev.azure.com/v3/example/template/satellite-templates","branch":"master","git_user":"satadmin","templates":[]}}[root@satellite ~]

Environment

  • Satellite 6.4

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content