Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jgit-dev] Cannot push commit on current branch
  • From: Thomas Keller <Thomas.Keller@xxxxxxxxxxxxxxxxxx>
  • Date: Tue, 12 Aug 2025 11:48:25 +0000
  • Accept-language: de-DE, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=gls-itservices.com; dmarc=pass action=none header.from=gls-itservices.com; dkim=pass header.d=gls-itservices.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=NO5dsjY0/JXfkQdIBjotnlYPdUCcNK37xG4v1CaT52o=; b=Iidp37zFR4qI2l6695Is54ChEy/r/aGGG5Wxf+cuYnEU5xnJ9GfkKt/fhoMbkymqhgIr7SjQ0SdfeLXGPWweJmJbaqXpUgBwMlyV9j+rUrF5aJByba8IKz4E6XlK2OGKSujijeLrpeM7N9mW7mimfMIUd8tqfEPcg0t3DgQAm6caD1y8CrFFcctTKFQg5wnHx2qfKD9E53AzW6MsHPJHYhklgTWEsg7OJr47Vs74PmcyrCY9GwWU5uhl7kWQhrrH4oNIEIAAZLen/oDs/FAuNv+2cbC9G2h8HiRJJo78dljC5rwZ7WUn962Pyr1KMilmLrkMFfFs0KaJ6gt+oyw1Qw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=G0pR6vNRaV0VAieZrAFunKSqXv30AkIzudW3tTI0pi8pqyvIs2pfTxVBklDhJvWn3mGYL1Jj5G2BUVHgb9qnfChYS4B89TRBqHvQOd3zDXBOiQoPo/aCDjDpxabP4Ehx+Ytn6hJX0MKI2LnRDVrXRjt4xR7oXE2JeucV9PNWFyWqSDPC2ojqi3xtlVRiC1xjMQq+3jjgw3nv7zadCp0y17tjVHxA462RZEPm1KadD3Wm8YONBQ+I1yyA4cJ9lUMxvObHcX51b6rgqPFSD8P8yvVpQJy7hddYco7twdjVk6wTmyg7mxgh+Ic4surLi9obLG+PHaGmYTDTajPFzrFnKg==
  • Delivered-to: jgit-dev@xxxxxxxxxxx
  • List-archive: <https://www.eclipse.org/mailman/private/jgit-dev/>
  • List-help: <mailto:jgit-dev-request@eclipse.org?subject=help>
  • List-subscribe: <https://www.eclipse.org/mailman/listinfo/jgit-dev>, <mailto:jgit-dev-request@eclipse.org?subject=subscribe>
  • List-unsubscribe: <https://www.eclipse.org/mailman/options/jgit-dev>, <mailto:jgit-dev-request@eclipse.org?subject=unsubscribe>
  • Thread-index: AQHcCHjVHzOz0sFcPUOUA2cJ6vsEBbRe7M9V
  • Thread-topic: Cannot push commit on current branch

Hello all,

 

evaluating PushResults actually helped, it was a dangling repository rule that prevented the update of the reference.

 

Sorry for noise,

Thomas.

 

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

Hello all!

 

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.

 

What am I missing?

 

Thanks in advance,

Thomas.


GLS IT Services GmbH
Sitz: Neuenstein, Amtsgericht Bad Hersfeld HRB 388, Geschäftsführer: Thorsten Pruin



GLS IT Services GmbH
Sitz: Neuenstein, Amtsgericht Bad Hersfeld HRB 388, Geschäftsführer: Thorsten Pruin

Back to the top