I'm using personal access token for installing private git repositories. However, It isn't supported by poetry.
You can see the error below.
$ poetry add git+https://MY_TOKEN:[email protected]/efe/my-private-repository.git
[ValueError]
Could not parse version constraint: //MY_TOKEN:[email protected]/efe/my-private-repository.git
add [-D|--dev] [--git GIT] [--path PATH] [-E|--extras EXTRAS] [--optional] [--python PYTHON] [--platform PLATFORM] [--allow-prereleases] [--dry-run] [--] <name> (<name>)...
Hello @efe ,
thanks for reporting. However, this was reported earlier in #2062 and should be fixed once #2169 is merged.
fin swimmer
@finswimmer Sorry, I was using an old release of Poetry. But, The bug still exists. I'd like you to re-open the issue.
I've updated Poetry to the latest version which is 1.0.5. poetry add command still gives an error. However, The description is different in this case.
$ poetry add git+https://MY_TOKEN:[email protected]/efe/[email protected]
[ValueError]
Invalid git url "git+https://MY_TOKEN:[email protected]/efe/[email protected]"
If I remove the version,
$ poetry add git+https://MY_TOKEN:[email protected]/efe/my-private-repository.git
[CalledProcessError]
Command '['git', 'clone', 'https://MY_TOKEN/[email protected]/efe/my-private-repository.git', '/var/folders/qf/f1j5ss4n6ll0nkvrx_pzvrnr0000gn/T/pypoetry-git-my-private-repository8wyivpr2']' returned non-zero exit status 128.
Also, Deploy key auth and Personal access token auth are different methods. They have different paths.
git+https://MY_TOKEN:[email protected]/efe/my-private-repository.gitgit+https://TOKEN_NAME:[email protected]/efe/my-private-repository.gitBTW, my token is an alphanumeric string.
Hello @efe,
the PR I've linked isn't merged until now. So it's not included in any release of poetry. I'm still searching for a source where it is described how a deployment key looks like and what characters are allowed. Do you know any source?
fin swimmer
$ poetry add git+https://MY_TOKEN:[email protected]/efe/[email protected]
[ValueError]
Invalid git url "git+https://MY_TOKEN:[email protected]/efe/[email protected]"
```
Facing the same issue on 1.1.0.
Most helpful comment
Facing the same issue on 1.1.0.