Hi, I’m trying to use the “Push to a remote repository” feature located in settings → repository, but have problems configuring it.
I want to use git over ssh with public key auth, but there is no place I can find the public key to use on the other server.
There is the “pull from remote repository” tab that has a configuration dialog that pops out when I type in a ssh://
URI, but noting like this in the push tab.
When I try to connect without a public key, or with the one that was in the pull tab, I always get:
The remote repository failed to update 17 minutes ago.
2:Fetching remote remote_mirror_[snip] failed: Host key verification failed.
fatal: Could not read from remote repository.Please make sure you have the correct access rights
and the repository exists.
And in my /var/log/auth.log
I get only:
Apr 16 10:20:13 [servername] sshd[6940]: Connection closed by 40.84.46.166 [preauth]
Where 40.84.46.166
seems to be an azure server.
The Git repository URL I’m using is in the form of ssh://gitolite@example.com/repo.git
, and I understand that this is the equivalent of gitolite@example.com:repo.git
used in a git remote.
Also, in the inspector console, there are two potential issues (project ids, tokens and paths censored):
repository:1 [DOM] Found 2 elements with non-unique id #: (More info: https://goo.gl/9p2vKq)
<input type="search" id class="dropdown-input-field" placeholder="Search protected branches" autocomplete="off">
<input type="search" id class="dropdown-input-field" placeholder="Search protected tags" autocomplete="off">
repository:1 [DOM] Found 2 elements with non-unique id #0000000: (More info: https://goo.gl/9p2vKq)
<form class="gl-show-field-errors project-mirror-push-form js-project-mirror-push-form" autocomplete="false" data-project-mirror-endpoint="[snip]/mirror/ssh_host_keys.json"
id="0000000" action="[snip]/mirror" accept-charset="UTF-8" method="post">…</form><input name="utf8" type="hidden" value="✓"><input type="hidden" name="_method"
value="patch"><input type="hidden" name="authenticity_token" value="[tokentokentoken]"><div>
</div><div class="form-group">…</div><div class="form-group">…</div><div class="account-well prepend-top-default append-bottom-default">…</div><div class="form-group
js-ssh-host-keys-section">…</div><div class="form-group">…</div><div class="form-group">…</div><input type="hidden" value="111111" name="project[import_data_attributes][id]"
id="project_import_data_attributes_id"><div class="form-group">…</div><div class="form-group">…</div><div class="form-group">…</div><div class="form-group">…</div><input type="submit"
name="update_remote_mirror" value="Save changes" class="btn btn-create"></form>
<form class="edit_project" id="0000000" action="[snip]/mirror" accept-charset="UTF-8" method="post">…</form>
Using the hosted version at gitlab.com.
The other server is using gitolite (so git over ssh with public key auth)