Skip to content
This repository was archived by the owner on Jan 20, 2025. It is now read-only.
This repository was archived by the owner on Jan 20, 2025. It is now read-only.

clone over https #15

@dasch124

Description

@dasch124

Hi,
first thanks for publishing the released xar package - I tried to build eXgit by myself, but ran into the same issue like joeviz, so this helped me to get started.

I was wondering: Is it (or will it be) possible to clone a git repo via https or using public keys? We have several institutional git repositories that are managed with gitolite or the Redmine Git Hosting plugin - so the only option to clone with credentials is via https.

That's what I tried so far:

xquery version "3.0";

import module namespace git="http://exist-db.org/git";

let $remotePath := "https://myuser@somehost.org/redmine/myRepo.git",
    $localPath := "/db/myClone",
    $username := "myusername",
    $password := "mypassword"

return git:clone($remotePath, $localPath, $username, $password)

this leads to an org.eclipse.jgit.api.errors.InvalidRemoteException: Invalid remote: origin

Using the git bash, the same remote Path is reachable and works fine.

I guess this is a feature, not a bug - but maybe this would be not too complex to add?
Thanks,
Daniel

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions