Von:
jgit-dev <jgit-dev-bounces@xxxxxxxxxxx> im Auftrag von Thomas Keller via jgit-dev <jgit-dev@xxxxxxxxxxx>
Datum: Freitag, 8. August 2025 um 17:46
An: jgit-dev@xxxxxxxxxxx <jgit-dev@xxxxxxxxxxx>
Cc: Thomas Keller <Thomas.Keller@xxxxxxxxxxxxxxxxxx>
Betreff: [jgit-dev] Cannot push commit on current branch
I'm working on a workspace that has been checked out via Jenkins (Github Plugin). I create a commit, tag it and later want to push the said commit. All works fine, except that the commit is not
pushed to my branch ref, but later only exists tagged, i.e. is otherwise detached.
At first I checked git log after the commit and that seemed to have went fine:
+ git log --decorate -n2
16:33:16 commit 58d0e3e5eabada2d33eec5ac87950109fbede70a (HEAD -> release/art/89.2)
16:33:16 Author: ...
16:33:16 Date: Fri Aug 8 14:33:16 2025 +0000
16:33:16
16:33:16 ...
16:33:16
16:33:16 commit 672944ffad5587f67d6fb2a31639d11c57d849fc (origin/release/art/89.2)
16:33:16 Author: ...
16:33:16 Date: Fri Aug 8 15:51:11 2025 +0200
16:33:16
16:33:16 ...
so HEAD moved forward to
58d0e3e5.
But still, when I push like this (Kotlin) the branch ref is not updated:
push().apply {
setCredentialsProvider(UsernamePasswordCredentialsProvider(..., ...))
setPushTags()
setPushAll()
call()
}
I guess this has something to do with a missing tracking branch setup, and usually I do `-u` or `--set-upstream` on the command line `push`, but I don't know how to do that with
jgit.
GLS IT Services GmbH
Sitz: Neuenstein, Amtsgericht Bad Hersfeld HRB 388, Geschäftsführer: Thorsten Pruin