Hi all
08:31:48 using GIT_SSH to set credentials ****@amarula
08:31:48 Verifying host key using known hosts file
08:31:48 > git ls-remote --
ssh://****@
gerrit-review.amarulasolutions.com:29418/mixfit/biolooper-demo
# timeout=10
08:31:49 > git rev-parse
b2a8a666270933a399417eb74a91600de772f525^{commit} # timeout=10
08:31:49 > git rev-parse
7c8bfe8e65e26f8d8684ea5f9f5201f4c1936bcc^{commit} # timeout=10
08:31:49 > git rev-list
b2a8a666270933a399417eb74a91600de772f525..7c8bfe8e65e26f8d8684ea5f9f5201f4c1936bcc
# timeout=10
08:31:49 Fetching upstream changes from
ssh://****@
gerrit-review.amarulasolutions.com:29418/mixfit/biolooper-demo
08:31:49 using GIT_SSH to set credentials ****@amarula
08:31:49 Verifying host key using known hosts file
08:31:49 > git fetch --no-tags --force --progress --depth=71 --
ssh://****@
gerrit-review.amarulasolutions.com:29418/mixfit/biolooper-demo
+refs/heads/*:refs/remotes/origin/* # timeout=10
08:31:49 ****@
gerrit-review.amarulasolutions.com: Permission denied
(publickey).
08:31:49 fatal: Could not read from remote repository.
08:31:49
08:31:49 Please make sure you have the correct access rights
08:31:49 and the repository exists.
08:31:49 fatal: could not fetch
347d73cc711b4e111e3411c6a92b4b2c9c6c312c from promisor remote
[Pipeline] }
I have this log inside my plugin and I'm trying to understand why
credentials even are valid,
and injecting in git client is not working then in fetch.
public GitFetch(GitClient git, LocalGitInfo info) {
this.git = git;
this.info = info;
}
@Override
public Integer invoke(File workspace, VirtualChannel channel)
throws IOException, InterruptedException {
ObjectId fromId =
git.revParse(info.getMarkedRevision().getSha1String());
ObjectId toId = git.revParse(info.getBuiltRevision().getSha1String());
String range = fromId.name() + ".." + toId.name();
List<ObjectId> commits = new ArrayList<>();;
git.revList_().to(commits)
.reference(range)
.execute();
Integer depth = commits.size();
LOGGER.log(Level.SEVERE, "Commits size " + depth.intValue());
if (depth.intValue() > 0) {
List<RefSpec> refSpecs = Arrays.asList(
new RefSpec("+refs/heads/*:refs/remotes/" +
info.getRemote() + "/*")
);
try {
git.fetch_().shallow(true).depth(depth)
.from(new URIish(info.getRemoteUrl()),
refSpecs).tags(false).execute();
} catch (Exception e) {
LOGGER.log(Level.SEVERE, "Unable to fetch from remote");
}
}
return depth;
}
This is the invoke method
Michael
--
Michael Nazzareno Trimarchi
Co-Founder & Chief Executive Officer
M.
+39 347 913 2170
mic...@amarulasolutions.com
__________________________________
Amarula Solutions BV
Joop Geesinkweg 125, 1114 AB, Amsterdam, NL
T.
+31 (0)85 111 9172
in...@amarulasolutions.com
www.amarulasolutions.com