From: Stefan Sperling Subject: Re: add ssh -i support To: gameoftrees@openbsd.org Date: Fri, 10 Jan 2025 16:20:15 +0100 On Fri, Jan 10, 2025 at 12:00:57PM +0100, Stefan Sperling wrote: > Add a -i option to got clone, fetch, send, as well as cvg clone, > update, commit. This allows ad-hoc use of SSH private keys without > having to create entries in ~/.ssh/config. > > The test suite for an upcoming gotsysd(8) daemon needs this to log > into temporary test VMs with temporary SSH keys, both generated by > the test suite. > > ok? Updated diff, with two issues in the previous diff repaired: 1) The -i option wasn't added to getopt in cmd_send(). 2) usage() output was not updated. This was already a problem when the -J options were added; I've added -J to usage() on the main branch, and this diff has been rebased accordingly. M cvg/cvg.1 | 21+ 0- M cvg/cvg.c | 27+ 13- M got/got.1 | 21+ 0- M got/got.c | 25+ 15- M include/got_fetch.h | 2+ 1- M include/got_send.h | 2+ 1- M include/got_worktree_cvg.h | 2+ 2- M lib/dial.c | 6+ 2- M lib/fetch.c | 3+ 2- M lib/got_lib_dial.h | 2+ 1- M lib/send.c | 2+ 2- M lib/worktree_cvg.c | 10+ 8- 12 files changed, 123 insertions(+), 47 deletions(-) commit - ade7d17b61c37a325ad378c3094c412c26775695 commit + 10010ddf05641c5f3d524adb26dc876dd5d2bcb5 blob - 5e361ba7f6fa77f9358deaad245b6589b7c35e15 blob + 6652a0e142d22804174660f5bfac8d20073bdec6 --- cvg/cvg.1 +++ cvg/cvg.1 @@ -135,6 +135,7 @@ working directory. .Cm clone .Op Fl almqv .Op Fl b Ar branch +.Op Fl i Ar identity-file .Op Fl J Ar jumphost .Op Fl R Ar reference .Ar repository-URL @@ -241,6 +242,12 @@ repository's HEAD reference will be fetched. Cannot be used together with the .Fl a option. +.It Fl i Ar identity-file +Specify an +.Ar identity-file , +containing a private SSH key, to use with SSH connections. +The same option will be passed to +.Xr ssh 1 . .It Fl J Ar jumphost Specify a .Ar jumphost @@ -408,6 +415,7 @@ Silence progress output. .Op Fl q .Op Fl b Ar branch .Op Fl c Ar commit +.Op Fl i Ar identity-file .Op Fl J Ar jumphost .Op Ar path ... .Xc @@ -505,6 +513,12 @@ An abbreviated hash argument will be expanded to a com automatically, provided the abbreviation is unique. If this option is not specified, the most recent commit on the work tree's branch will be used. +.It Fl i Ar identity-file +Specify an +.Ar identity-file , +containing a private SSH key, to use with SSH connections. +The same option will be passed to +.Xr ssh 1 . .It Fl J Ar jumphost Specify a .Ar jumphost @@ -1301,6 +1315,7 @@ is a directory. .Op Fl CNnS .Op Fl A Ar author .Op Fl F Ar path +.Op Fl i Ar identity-file .Op Fl J Ar jumphost .Op Fl m Ar message .Op Ar path ... @@ -1411,6 +1426,12 @@ Use the specified log message when creating the new co Cannot be used together with the .Fl F option. +.It Fl i Ar identity-file +Specify an +.Ar identity-file , +containing a private SSH key, to use with SSH connections. +The same option will be passed to +.Xr ssh 1 . .It Fl J Ar jumphost Specify a .Ar jumphost blob - 03a557efc3e149c688ccef8824070a30f1e5824c blob + 9f56f71abaf2f27bce1a2db6a03fcb31eec8511e --- cvg/cvg.c +++ cvg/cvg.c @@ -980,8 +980,9 @@ done: __dead static void usage_clone(void) { - fprintf(stderr, "usage: %s clone [-almqv] [-b branch] [-J jumphost ] " - "[-R reference] repository-URL [directory]\n", getprogname()); + fprintf(stderr, "usage: %s clone [-almqv] [-b branch] " + "[-i identity-file] [-J jumphost] [-R reference] " + "repository-URL [directory]\n", getprogname()); exit(1); } @@ -1541,6 +1542,7 @@ cmd_clone(int argc, char *argv[]) int verbosity = 0, fetch_all_branches = 0, mirror_references = 0; int bflag = 0, list_refs_only = 0; int *pack_fds = NULL; + const char *identity_file = NULL; const char *jumphost = NULL; RB_INIT(&refs); @@ -1548,7 +1550,7 @@ cmd_clone(int argc, char *argv[]) RB_INIT(&wanted_branches); RB_INIT(&wanted_refs); - while ((ch = getopt(argc, argv, "ab:J:lmqR:v")) != -1) { + while ((ch = getopt(argc, argv, "ab:i:J:lmqR:v")) != -1) { switch (ch) { case 'a': fetch_all_branches = 1; @@ -1560,6 +1562,9 @@ cmd_clone(int argc, char *argv[]) return error; bflag = 1; break; + case 'i': + identity_file = optarg; + break; case 'J': jumphost = optarg; break; @@ -1681,7 +1686,7 @@ cmd_clone(int argc, char *argv[]) printf("Connecting to %s\n", git_url); error = got_fetch_connect(&fetchpid, &fetchfd, proto, host, port, - server_path, jumphost, verbosity); + server_path, jumphost, identity_file, verbosity); if (error) goto done; @@ -2493,8 +2498,9 @@ print_merge_progress_stats(struct got_update_progress_ __dead static void usage_update(void) { - fprintf(stderr, "usage: %s update [-qtvX] [-c commit] [-J jumphost ] " - "[-r remote] [path ...]\n", getprogname()); + fprintf(stderr, "usage: %s update [-qtvX] [-c commit] " + "[-i identity-file] [-J jumphost] [-r remote] [path ...]\n", + getprogname()); exit(1); } @@ -2673,6 +2679,7 @@ cmd_update(int argc, char *argv[]) char *commit_id_str = NULL; const char *refname; struct got_reference *head_ref = NULL; + const char *identity_file = NULL; const char *jumphost = NULL; RB_INIT(&paths); @@ -2682,13 +2689,16 @@ cmd_update(int argc, char *argv[]) RB_INIT(&wanted_branches); RB_INIT(&wanted_refs); - while ((ch = getopt(argc, argv, "c:J:qr:vX")) != -1) { + while ((ch = getopt(argc, argv, "c:i:J:qr:vX")) != -1) { switch (ch) { case 'c': commit_id_str = strdup(optarg); if (commit_id_str == NULL) return got_error_from_errno("strdup"); break; + case 'i': + identity_file = optarg; + break; case 'J': jumphost = optarg; break; @@ -2843,7 +2853,7 @@ cmd_update(int argc, char *argv[]) } error = got_fetch_connect(&fetchpid, &fetchfd, proto, host, port, - server_path, jumphost, verbosity); + server_path, jumphost, identity_file, verbosity); if (error) goto done; @@ -7489,8 +7499,9 @@ done: __dead static void usage_commit(void) { - fprintf(stderr, "usage: %s commit [-CNnS] [-A author] [-J jumphost ] " - "[-F path] [-m message] [path ...]\n", getprogname()); + fprintf(stderr, "usage: %s commit [-CNnS] [-A author] " + "[-i identity-file] [-J jumphost] [-F path] [-m message] " + "[path ...]\n", getprogname()); exit(1); } @@ -7813,7 +7824,7 @@ cmd_commit(int argc, char *argv[]) int nremotes; char *proto = NULL, *host = NULL, *port = NULL; char *repo_name = NULL, *server_path = NULL; - const char *remote_name, *jumphost = NULL; + const char *remote_name, *jumphost = NULL, *identity_file = NULL; int verbosity = 0; int i; @@ -7827,7 +7838,7 @@ cmd_commit(int argc, char *argv[]) err(1, "pledge"); #endif - while ((ch = getopt(argc, argv, "A:CF:J:m:NnS")) != -1) { + while ((ch = getopt(argc, argv, "A:CF:i:J:m:NnS")) != -1) { switch (ch) { case 'A': author = optarg; @@ -7846,6 +7857,9 @@ cmd_commit(int argc, char *argv[]) return got_error_from_errno2("realpath", optarg); break; + case 'i': + identity_file = optarg; + break; case 'J': jumphost = optarg; break; @@ -8038,7 +8052,7 @@ cmd_commit(int argc, char *argv[]) error = got_worktree_cvg_commit(&id, worktree, &paths, author, committer, allow_bad_symlinks, show_diff, commit_conflicts, collect_commit_logmsg, &cl_arg, print_status, NULL, proto, host, - port, server_path, jumphost, verbosity, remote, + port, server_path, jumphost, identity_file, verbosity, remote, check_cancelled, repo); if (error) { if (error->code != GOT_ERR_COMMIT_MSG_EMPTY && blob - 96794d6aa787f704f409ac79ea9ef7d1ef02caee blob + dbd5096b6fb2eb9f6253e0d0673a2a9e0d7aff47 --- got/got.1 +++ got/got.1 @@ -204,6 +204,7 @@ working directory. .Cm clone .Op Fl almqv .Op Fl b Ar branch +.Op Fl i Ar identity-file .Op Fl J Ar jumphost .Op Fl R Ar reference .Ar repository-URL @@ -339,6 +340,12 @@ repository's HEAD reference will be fetched. Cannot be used together with the .Fl a option. +.It Fl i Ar identity-file +Specify an +.Ar identity-file , +containing a private SSH key, to use with SSH connections. +The same option will be passed to +.Xr ssh 1 . .It Fl J Ar jumphost Specify a .Ar jumphost @@ -432,6 +439,7 @@ The maximum is 3. .Cm fetch .Op Fl adlqtvX .Op Fl b Ar branch +.Op Fl i Ar identity-file .Op Fl J Ar jumphost .Op Fl R Ar reference .Op Fl r Ar repository-path @@ -539,6 +547,12 @@ Any commit, tree, tag, and blob objects belonging to d tags remain in the repository and may be removed separately with Git's garbage collector or .Cm gotadmin cleanup . +.It Fl i Ar identity-file +Specify an +.Ar identity-file , +containing a private SSH key, to use with SSH connections. +The same option will be passed to +.Xr ssh 1 . .It Fl J Ar jumphost Specify a .Ar jumphost @@ -2351,6 +2365,7 @@ in the repository. .Op Fl afqTv .Op Fl b Ar branch .Op Fl d Ar branch +.Op Fl i Ar identity-file .Op Fl J Ar jumphost .Op Fl r Ar repository-path .Op Fl t Ar tag @@ -2486,6 +2501,12 @@ copy of a branch or tag is known to be out-of-date and disposable. The risks of creating inconsistencies between different repositories should also be taken into account. +.It Fl i Ar identity-file +Specify an +.Ar identity-file , +containing a private SSH key, to use with SSH connections. +The same option will be passed to +.Xr ssh 1 . .It Fl J Ar jumphost Specify a .Ar jumphost blob - 973904fe980108e937842467e1fc1d0a37cac94a blob + befaceb8a70675a6285899fa28baef2658ad213e --- got/got.c +++ got/got.c @@ -1076,8 +1076,9 @@ done: __dead static void usage_clone(void) { - fprintf(stderr, "usage: %s clone [-almqv] [-b branch] [-J jumphost ] " - "[-R reference] " "repository-URL [directory]\n", getprogname()); + fprintf(stderr, "usage: %s clone [-almqv] [-b branch] " + "[-i identity-file] [-J jumphost] [-R reference] " + "repository-URL [directory]\n", getprogname()); exit(1); } @@ -1634,7 +1635,7 @@ cmd_clone(int argc, char *argv[]) pid_t fetchpid = -1; struct got_fetch_progress_arg fpa; char *git_url = NULL; - const char *jumphost = NULL; + const char *jumphost = NULL, *identity_file = NULL; int verbosity = 0, fetch_all_branches = 0, mirror_references = 0; int bflag = 0, list_refs_only = 0; int *pack_fds = NULL; @@ -1644,7 +1645,7 @@ cmd_clone(int argc, char *argv[]) RB_INIT(&wanted_branches); RB_INIT(&wanted_refs); - while ((ch = getopt(argc, argv, "ab:J:lmqR:v")) != -1) { + while ((ch = getopt(argc, argv, "ab:i:J:lmqR:v")) != -1) { switch (ch) { case 'a': fetch_all_branches = 1; @@ -1656,6 +1657,9 @@ cmd_clone(int argc, char *argv[]) return error; bflag = 1; break; + case 'i': + identity_file = optarg; + break; case 'J': jumphost = optarg; break; @@ -1777,7 +1781,7 @@ cmd_clone(int argc, char *argv[]) printf("Connecting to %s\n", git_url); error = got_fetch_connect(&fetchpid, &fetchfd, proto, host, port, - server_path, jumphost, verbosity); + server_path, jumphost, identity_file, verbosity); if (error) goto done; @@ -2139,9 +2143,9 @@ done: __dead static void usage_fetch(void) { - fprintf(stderr, "usage: %s fetch [-adlqtvX] [-b branch] [-J jumphost ] " - "[-R reference] [-r repository-path] [remote-repository]\n", - getprogname()); + fprintf(stderr, "usage: %s fetch [-adlqtvX] [-b branch] " + "[-i identity-file] [-J jumphost] [-R reference] " + "[-r repository-path] [remote-repository]\n", getprogname()); exit(1); } @@ -2395,7 +2399,7 @@ cmd_fetch(int argc, char *argv[]) int delete_refs = 0, replace_tags = 0, delete_remote = 0; int *pack_fds = NULL, have_bflag = 0; const char *remote_head = NULL, *worktree_branch = NULL; - const char *jumphost = NULL; + const char *jumphost = NULL, *identity_file = NULL; RB_INIT(&refs); RB_INIT(&symrefs); @@ -2403,7 +2407,7 @@ cmd_fetch(int argc, char *argv[]) RB_INIT(&wanted_branches); RB_INIT(&wanted_refs); - while ((ch = getopt(argc, argv, "ab:dJ:lqR:r:tvX")) != -1) { + while ((ch = getopt(argc, argv, "ab:di:J:lqR:r:tvX")) != -1) { switch (ch) { case 'a': fetch_all_branches = 1; @@ -2418,6 +2422,9 @@ cmd_fetch(int argc, char *argv[]) case 'd': delete_refs = 1; break; + case 'i': + identity_file = optarg; + break; case 'J': jumphost = optarg; break; @@ -2658,7 +2665,7 @@ cmd_fetch(int argc, char *argv[]) } error = got_fetch_connect(&fetchpid, &fetchfd, proto, host, port, - server_path, jumphost, verbosity); + server_path, jumphost, identity_file, verbosity); if (error) goto done; #ifndef PROFILE @@ -9797,7 +9804,7 @@ __dead static void usage_send(void) { fprintf(stderr, "usage: %s send [-afqTv] [-b branch] [-d branch] " - "[-J jumphost ] [-r repository-path] [-t tag] " + "[-i identity-file] [-J jumphost] [-r repository-path] [-t tag] " "[remote-repository]\n", getprogname()); exit(1); } @@ -10025,7 +10032,7 @@ cmd_send(int argc, char *argv[]) int send_all_branches = 0, send_all_tags = 0; struct got_reference *ref = NULL; int *pack_fds = NULL; - const char *jumphost = NULL; + const char *jumphost = NULL, *identity_file = NULL; RB_INIT(&branches); RB_INIT(&tags); @@ -10034,7 +10041,7 @@ cmd_send(int argc, char *argv[]) RB_INIT(&delete_args); RB_INIT(&delete_branches); - while ((ch = getopt(argc, argv, "ab:d:fJ:qr:Tt:v")) != -1) { + while ((ch = getopt(argc, argv, "ab:d:fi:J:qr:Tt:v")) != -1) { switch (ch) { case 'a': send_all_branches = 1; @@ -10053,6 +10060,9 @@ cmd_send(int argc, char *argv[]) case 'f': overwrite_refs = 1; break; + case 'i': + identity_file = optarg; + break; case 'J': jumphost = optarg; break; @@ -10323,7 +10333,7 @@ cmd_send(int argc, char *argv[]) } error = got_send_connect(&sendpid, &sendfd, proto, host, port, - server_path, jumphost, verbosity); + server_path, jumphost, identity_file, verbosity); if (error) goto done; blob - abf138991ddab8ea1eae485f37d910d443f8fe76 blob + 4e7f538f523c582bd0b2b8be1e97182731a9ec7e --- include/got_fetch.h +++ include/got_fetch.h @@ -20,6 +20,7 @@ * Attempt to open a connection to a server using the provided protocol * scheme, hostname port number (as a string) and server-side path. * A jumphost can be specified which will be passed to ssh(1) via -J. + * An identity file can be specified which will be passed to ssh(1) via -i. * A verbosity level can be specified; it currently controls the amount * of -v options passed to ssh(1). If the level is -1 ssh(1) will be run * with the -q option. @@ -32,7 +33,7 @@ * the process to exit with waitpid(2). Otherwise, return PID -1. */ const struct got_error *got_fetch_connect(pid_t *, int *, const char *, - const char *, const char *, const char *, const char *, int); + const char *, const char *, const char *, const char *, const char *, int); /* A callback function which gets invoked with progress information to print. */ typedef const struct got_error *(*got_fetch_progress_cb)(void *, blob - 9f8c6498d5a65aa365c53f33830bcb336c8c2ee3 blob + f80d4a9a8b4bfaf749a1088b2095b9c830444385 --- include/got_send.h +++ include/got_send.h @@ -27,13 +27,14 @@ * If successful return an open file descriptor for the connection which can * be passed to other functions below, and must be disposed of with close(2). * A jumphost can be specified which will be passed to ssh(1) via -J. + * An identity file can be specified which will be passed to ssh(1) via -i. * * If an ssh(1) process was started return its PID as well, in which case * the caller should eventually send SIGTERM to the procress and wait for * the process to exit with waitpid(2). Otherwise, return PID -1. */ const struct got_error *got_send_connect(pid_t *, int *, const char *, - const char *, const char *, const char *, const char *, int); + const char *, const char *, const char *, const char *, const char *, int); /* A callback function which gets invoked with progress information to print. */ typedef const struct got_error *(*got_send_progress_cb)(void *, blob - 72cd9b87962075687ca6d1b929f6f55cb33236ef blob + 057137a8ccbd155e4eebbe781aa2acbab0177706 --- include/got_worktree_cvg.h +++ include/got_worktree_cvg.h @@ -31,8 +31,8 @@ const struct got_error *got_worktree_cvg_commit(struct struct got_worktree *, struct got_pathlist_head *, const char *, const char *, int, int, int, got_worktree_commit_msg_cb, void *, got_worktree_status_cb, void *, const char *, const char *, const char *, - const char *, const char *, int, const struct got_remote_repo *, - got_cancel_cb, struct got_repository *); + const char *, const char *, const char *, int, + const struct got_remote_repo *, got_cancel_cb, struct got_repository *); /* * Get the reference name for a temporary commit to be trivially rebased blob - ca330996f861e3db0b6d6182071f7f81bb4b4144 blob + ea890900b6bc6242e49b59d03cac8cef99cad633 --- lib/dial.c +++ lib/dial.c @@ -263,13 +263,13 @@ escape_path(char *buf, size_t bufsize, const char *pat const struct got_error * got_dial_ssh(pid_t *newpid, int *newfd, const char *host, const char *port, const char *path, const char *jumphost, - const char *command, int verbosity) + const char *identity_file, const char *command, int verbosity) { const struct got_error *error = NULL; int pid, pfd[2]; char cmd[64]; char escaped_path[PATH_MAX]; - const char *argv[13]; + const char *argv[15]; int i = 0, j; *newpid = -1; @@ -291,6 +291,10 @@ got_dial_ssh(pid_t *newpid, int *newfd, const char *ho for (j = 0; j < MIN(3, verbosity); j++) argv[i++] = "-v"; } + if (identity_file) { + argv[i++] = "-i"; + argv[i++] = identity_file; + } if (jumphost) { argv[i++] = "-J"; argv[i++] = jumphost; blob - 59805003b987f3c15b36a7b1612cf1bfc9128fb0 blob + f271143b425954027040e9e3e0ad142fb6c4d327 --- lib/fetch.c +++ lib/fetch.c @@ -80,7 +80,7 @@ const struct got_error * got_fetch_connect(pid_t *fetchpid, int *fetchfd, const char *proto, const char *host, const char *port, const char *server_path, - const char *jumphost, int verbosity) + const char *jumphost, const char *identity_file, int verbosity) { const struct got_error *err = NULL; @@ -89,7 +89,8 @@ got_fetch_connect(pid_t *fetchpid, int *fetchfd, const if (strcmp(proto, "ssh") == 0 || strcmp(proto, "git+ssh") == 0) err = got_dial_ssh(fetchpid, fetchfd, host, port, - server_path, jumphost, GOT_DIAL_CMD_FETCH, verbosity); + server_path, jumphost, identity_file, GOT_DIAL_CMD_FETCH, + verbosity); else if (strcmp(proto, "git") == 0) err = got_dial_git(fetchfd, host, port, server_path, GOT_DIAL_CMD_FETCH); blob - 2e53b80d6121b5d2e79d4ffedc74c0fb6529a6de blob + 744dd8b9e085007b57922969f9e2db67f86e8bf6 --- lib/got_lib_dial.h +++ lib/got_lib_dial.h @@ -23,7 +23,8 @@ const struct got_error *got_dial_git(int *newfd, const const struct got_error *got_dial_ssh(pid_t *newpid, int *newfd, const char *host, const char *port, const char *path, - const char *jumphost, const char *command, int verbosity); + const char *jumphost, const char *identity_file, + const char *command, int verbosity); const struct got_error *got_dial_http(pid_t *newpid, int *newfd, const char *host, const char *port, const char *path, int, int); blob - 87e3a2db6550d35ff268f3ad2af0d88e2f27904a blob + ed9e497c5a0fdf9632b1c65ac9a22bdfa1d64a61 --- lib/send.c +++ lib/send.c @@ -87,7 +87,7 @@ const struct got_error * got_send_connect(pid_t *sendpid, int *sendfd, const char *proto, const char *host, const char *port, const char *server_path, - const char *jumphost, int verbosity) + const char *jumphost, const char *identity_file, int verbosity) { const struct got_error *err = NULL; @@ -96,7 +96,7 @@ got_send_connect(pid_t *sendpid, int *sendfd, const ch if (strcmp(proto, "ssh") == 0 || strcmp(proto, "git+ssh") == 0) err = got_dial_ssh(sendpid, sendfd, host, port, server_path, - jumphost, GOT_DIAL_CMD_SEND, verbosity); + jumphost, identity_file, GOT_DIAL_CMD_SEND, verbosity); else if (strcmp(proto, "git") == 0) err = got_dial_git(sendfd, host, port, server_path, GOT_DIAL_CMD_SEND); blob - 4518253bb1454bef6d43a7a09d1bdc0b73168086 blob + 2aa66b6119819465449e3153ff18ad42e03458d3 --- lib/worktree_cvg.c +++ lib/worktree_cvg.c @@ -2764,9 +2764,10 @@ done: static const struct got_error * fetch_updated_remote(const char *proto, const char *host, const char *port, - const char *server_path, const char *jumphost, int verbosity, - const struct got_remote_repo *remote, struct got_repository *repo, - struct got_reference *head_ref, const char *head_refname) + const char *server_path, const char *jumphost, const char *identity_file, + int verbosity, const struct got_remote_repo *remote, + struct got_repository *repo, struct got_reference *head_ref, + const char *head_refname) { const struct got_error *err = NULL, *unlock_err = NULL; struct got_pathlist_entry *pe; @@ -2790,7 +2791,7 @@ fetch_updated_remote(const char *proto, const char *ho goto done; err = got_fetch_connect(&fetchpid, &fetchfd, proto, host, - port, server_path, jumphost, verbosity); + port, server_path, jumphost, identity_file, verbosity); if (err) goto done; @@ -2909,8 +2910,8 @@ got_worktree_cvg_commit(struct got_object_id **new_com got_worktree_commit_msg_cb commit_msg_cb, void *commit_arg, got_worktree_status_cb status_cb, void *status_arg, const char *proto, const char *host, const char *port, - const char *server_path, const char *jumphost, int verbosity, - const struct got_remote_repo *remote, + const char *server_path, const char *jumphost, const char *identity_file, + int verbosity, const struct got_remote_repo *remote, got_cancel_cb check_cancelled, struct got_repository *repo) { @@ -3089,7 +3090,7 @@ got_worktree_cvg_commit(struct got_object_id **new_com /* Attempt send to remote branch. */ err = got_send_connect(&sendpid, &sendfd, proto, host, port, - server_path, jumphost, verbosity); + server_path, jumphost, identity_file, verbosity); if (err) goto done; @@ -3110,7 +3111,8 @@ got_worktree_cvg_commit(struct got_object_id **new_com * No trivial-rebase yet; require update to be run manually. */ err = fetch_updated_remote(proto, host, port, server_path, - jumphost, verbosity, remote, repo, head_ref, head_refname); + jumphost, identity_file, verbosity, remote, repo, + head_ref, head_refname); if (err == NULL) goto done; err = got_error(GOT_ERR_COMMIT_OUT_OF_DATE);