I have 2 web servers. On server A I have a GitLab
installed.
On server B I just initialized a bare Git repo.
Now I want to automatically push the GitLab repo to server B using GitLab's remote repository mirror function
For this I need an HTTPS or SSH url, and I want to do it with SSH.
Question 1: What is the url I need to insert there? I guess it should be something like ssh://ssh-user@server-b.com:path-to-git-repos/project.git
. Is that right?
Question 2: Since the user connecting to the url is GitLab's Git user, I guess I need to create an own SSH key for this user and add the public key to my web server. How can I do this since the Git user has no permissions to do anything except from Git commands on terminal level? I guess I need to create it with the root user of my GitLab server, but how do I do that? I can't even find the Git user's home dir when I'm connected as root.