Skip to content
This repository was archived by the owner on Nov 10, 2024. It is now read-only.
This repository was archived by the owner on Nov 10, 2024. It is now read-only.

git fetch gets exception when https & ssh protocol conflict #125

@csonuryilmaz

Description

@csonuryilmaz

If repository first cached with http/https protocol and at a later time .hb GIT_PROTOCOL parameter is modified to be ssh protocol, operation gets an unhandled exception on git fetch:

  _           _       _    
 | |_ ___ _ _| |_ ___| |_  
 |   | -_| | | . | . |  _| 
 |_|_|___|_  |___|___|_|   
         |___|             

 2.8.0.0

== cleanup-git-tags - 2019-06-01 16:55:05

[*] Checking git credentials ...
	[i] 41 remote (head) refs found.
	[✓] Git credentials are ok.
	[i] Locally cached repository exists.
	[*] Updating remote refs ...
Ooops! An error occurred while executing [cl-tags]
Exception:	java.lang.ClassCastException
Message:	org.eclipse.jgit.transport.TransportHttp cannot be cast to org.eclipse.jgit.transport.SshTransport
StackTrace:
java.lang.ClassCastException: org.eclipse.jgit.transport.TransportHttp cannot be cast to org.eclipse.jgit.transport.SshTransport
	at operation.CleanupGitTags.lambda$setCredentials$0(CleanupGitTags.java:136)
	at org.eclipse.jgit.api.TransportCommand.configure(TransportCommand.java:155)
	at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:243)
	at operation.CleanupGitTags.fetchRepository(CleanupGitTags.java:208)
	at operation.CleanupGitTags.tryGetRepoPath(CleanupGitTags.java:168)
	at operation.CleanupGitTags.execute(CleanupGitTags.java:63)
	at operation.Operation.start(Operation.java:211)
	at heybot.heybot.tryExecute(heybot.java:208)
	at heybot.heybot.processOperation(heybot.java:174)
	at heybot.heybot.start(heybot.java:154)
	at heybot.heybot.processArgs(heybot.java:100)
	at heybot.heybot.main(heybot.java:40)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions