pyflow icon indicating copy to clipboard operation
pyflow copied to clipboard

Support for private package repositories (eg JFrog)

Open BrandonLWhite opened this issue 5 years ago • 7 comments

This project shows a lot of promise! However, with the hardcodes to pypi.org (example) it is not usable at commercial organizations that make use of private package repositories.

I also recommend adding a column to your very helpful comparison matrix to indicate if private package repositories are supported.

BrandonLWhite avatar Jun 03 '20 22:06 BrandonLWhite

Do you know which of the others in the matrix support it?

David-OConnor avatar Jun 05 '20 01:06 David-OConnor

@David-OConnor Poetry, pip+venv support private repos.

bacon1664 avatar Oct 19 '20 13:10 bacon1664

Is this issue the same as what I'm experiencing? I'm not sure if this is a peculiarity of the package I'm trying to install, or a limitation of pyflow.

$ pyflow install Git+ssh://[email protected]/path/to/private-repo.git
Unable to parse this package: Git+ssh://[email protected]/path/to/private-repo.git. Note that installing a specific version via the CLI is currently unsupported. If you need to specify a version,edit `pyproject.toml`

trying without "Git+"

$ pyflow install ssh://[email protected]/path/to/private-repo.git
Found lockfile
Unable to parse this package: ssh://[email protected]/path/to/private-repo.git. Note that installing a specific version via the CLI is currently unsupported. If you need to specify a version,edit `pyproject.toml`

Adding the package to the pyproject.toml manually using the format shown in the docs (same as Pipfile's format) resulted in a different error:

$ pyflow install
Can't get version info for the dependency `private-repo`. Is it spelled correctly? Is the internet connection ok?

Other details, if they're relevant:

$ pyflow --version
pyflow 0.2.8
$ tree .
.
├── pyflow_demo
│   └── __init__.py
├── pyflow.lock
├── __pypackages__
│   └── 3.8
│       └── lib
├── pyproject.toml
└── README.md

ElijahSink avatar Nov 01 '20 01:11 ElijahSink

Yep - same issue. This is due to pyflow not supporting private repos.

David-OConnor avatar Nov 01 '20 01:11 David-OConnor

Is this something you plan to support in the future, and could we help with this?

ElijahSink avatar Nov 01 '20 03:11 ElijahSink

I'd like to support it, but don't have the time to dedicated to it (Or more broadly to this project) at this time. If you have any thoughts on implementing, go for it!

David-OConnor avatar Nov 01 '20 03:11 David-OConnor

I'm looking at this function, and it's unclear to me why this wouldn't just use the current user's SSH keys (and hence clone the repo successfully). Where does the current process break down?

pub fn download_git_repo(repo: &str, dest_path: &Path) -> Result<(), Box<dyn Error>> {
    // todo: Download directly instead of using git clone?
    // todo: Suppress this output.
    if Command::new("git").arg("--version").status().is_err() {
        util::abort("Can't find Git on the PATH. Is it installed?");
    }

    let output = Command::new("git")
        .current_dir(dest_path)
        .args(&["clone", repo])
        .output()?;
    util::check_command_output(&output, "cloning repo");
    Ok(())
}

I'm just looking for the right point of attack. Thanks for your time :)

ElijahSink avatar Nov 01 '20 18:11 ElijahSink