You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So how can I install my ansible package that is tagged with v2.6.0.1?
Reacted by Stephan Fitzpatrick, Roman Inflianskas, Tomas Mrozek, Yevhenii Kovalchuk, b-long, Hadrien David, Janusz Skonieczny, laike9m, George Walker, Feraidoon Mehri and 3 more
Seems like the syntax is actually supposed to be poetry add ansible --git https://github.com/karantan/ansible. Im still trying to figure out how to specify the tag or a sha.
Reacted by Spencer Pogorzelski, JoshUsry and Alex P.
Reacted by Paul Robertson, John Slemmer, Yevhenii Kovalchuk, Dmitry Figol, Mat Gadd, Samuel Meuli, Robbie Clarken, drunkwcodes, Shimi Liderman, Boudewijn Aasman and 71 more
Do you have plans to improve adding git dependencies via CLI?
Like poetry add --git https://github.com/Rapptz/discord.py.git --branch rewrite or poetry add --git https://github.com/Rapptz/discord.py.git@rewrite?
Solution by @narimanizett works perfectly fine, but better CLI would be great. :)
Reacted by Iramis Valentin, Shimi Liderman, Samuel Bishop, Sylvain Hellegouarch, Lionel Young, Gokul Krishnan, PedroRegisPOAR, Matěj Račinský, Angella Naigaga , Daniel Bischof and 3 more
now plugin which we use to deploy project to aws lambda uses export function.
Problem is that when you have dependency to git branch added manually, default category in poetry.lock is being set to main.
And when serverless-python-requirements plugin uses export command it includes also dev dependency, because locker includes packages with main category.
The add command will be improved in the next 1.0.0 release (see #1221). For instance, to use the original example, it will now be possible with the following syntax:
Reacted by Gasper Vozel, Franklin Yu, David Flores, Ezra Bowden, Miko, Johannes Weytjens, Ülgen Sarıkavak, Bachynin Ivan, Avishay Zarad, Alexander Kammerer and 53 more
Reacted by Sylvain Hellegouarch and Hayato Tsukagoshi
Reacted by Aakash Kag, Tom Cornebize, PedroRegisPOAR, Hayato Tsukagoshi, Vitalii, Dmitry Vasilev and Frank Fineis
Reacted by Aakash Kag, Hayato Tsukagoshi, Anudeep Samaiya, Natanael Arndt and Vladimir Seregin
[RuntimeError]
The Poetry configuration is invalid:
- [dependencies.myproject] {'git': 'ssh://git@mygitlab.com/myproject.gi', 'tags': '0.47.0'} is not valid under any of the given schemas
@finswimmer Thanks, tags instead of tag was indeed a typo of mine, no idea how it got there though. That being said it would be nice if the error message would be more verbose as debugging this was quite a journey.
Hi guys, sorry to post this in a closed issue, not know if I need open a new issue for this...
we're working with a private repo, when I add the package in the cli, using https protocol this work fine, but it's asking me user and password and because we'll deploy the code with CI/CD I'd prefer use ssh and use the stored ssh keys...
when I replace this
poetry add git+https.....
for this
poetry add git+git@gitlab....
or
poetry add git@gitlab.....
this doesn't work
Could not find a matching version of package git+git
at ~/.local/pipx/venvs/poetry/lib/python3.9/site-packages/poetry/console/commands/init.py:367 in _find_best_version_for_package
363│ )
364│
365│ if not package:
366│ # TODO: find similar
→ 367│ raise ValueError(
368│ "Could not find a matching version of package {}".format(name)
369│ )
370│
371│ return package.pretty_name, selector.find_recommended_require_version(package)
I've also tried add my package in the pyproject.toml
That way you can keep the ssh config and then the CI job would use a temporary token to access the repo with the same permissions as whoever runs the job.
You may need to try different values for ssh://git@ssh.gitlab.com depending on how you added it to pyproject.toml
In my case
Tried: poetry add git+https://github.com/karantan/ansible.git@v2.6.0.1
Got: Command '['git', 'config', '-l']' returned non-zero exit status 128.
My directory
ls -l
-rw-rw-r-- 1 1000 1000 45 Nov 3 01:37 .git
drwxrwxr-x 4 1000 1000 4.0K Nov 3 01:37 .github
-rw-rw-r-- 1 1000 1000 809 Nov 3 01:37 .gitignore
...
My git is a submodule, i need to move .git to other name to make it work.
Any idea for git submodule issue?
Reacted by coneillpj, Subhi Al Qudsi, Jan Baykara, Clay Mullis and Yu Chen, Yang
Activity
perobertson commentedon Oct 25, 2018
Seems like the syntax is actually supposed to be
poetry add ansible --git https://github.com/karantan/ansible. Im still trying to figure out how to specify the tag or a sha.nariman commentedon Oct 25, 2018
There no difference.
Unfortunately, there's no way to do it via CLI, but you can manually add an entry into your pyproject.toml like this:
It should work.
senpos commentedon Jan 14, 2019
Do you have plans to improve adding git dependencies via CLI?
Like
poetry add --git https://github.com/Rapptz/discord.py.git --branch rewriteorpoetry add --git https://github.com/Rapptz/discord.py.git@rewrite?Solution by @narimanizett works perfectly fine, but better CLI would be great. :)
whisller commentedon Apr 8, 2019
@nariman @sdispater Is it possible to add dependency to git with
categorybeing set todev?We have a library that is our dev dependency i.e.
now plugin which we use to deploy project to aws lambda uses export function.
Problem is that when you have dependency to git branch added manually, default
categoryinpoetry.lockis being set tomain.And when
serverless-python-requirementsplugin usesexportcommand it includes also dev dependency, because locker includes packages with main category.I've tried to set
categorymanually as well with:But that didn't help,
categoryis still being set tomain. Any suggestions? Or maybe I am just looking at it from wrong angle?sdispater commentedon Jul 13, 2019
The
addcommand will be improved in the next1.0.0release (see #1221). For instance, to use the original example, it will now be possible with the following syntax:whisller commentedon Jul 17, 2019
@sdispater will it also work with setting git repository URL as
devdependency?I've mentioned about it in #313 (comment)
Granitosaurus commentedon Nov 26, 2019
Has this been silently removed in 1.0.0b7?
finswimmer commentedon Nov 26, 2019
Hello @Granitosaurus,
I see two issues:
[tool.poetry.dependencies]and not[dependencies.myproject]tagsmust be renamed totagfin swimmer
Granitosaurus commentedon Nov 26, 2019
@finswimmer Thanks,
tagsinstead oftagwas indeed a typo of mine, no idea how it got there though. That being said it would be nice if the error message would be more verbose as debugging this was quite a journey.laike9m commentedon May 2, 2020
It seems that the
.gitprefix can be safely ignored. Soworks as well. Please correct me if I'm wrong.
P403n1x87 commentedon Jun 12, 2020
My first attempts with ssh failed with the same error. It worked once I switched to https.
carlos-lm commentedon Sep 4, 2021
Hi guys, sorry to post this in a closed issue, not know if I need open a new issue for this...
we're working with a private repo, when I add the package in the cli, using https protocol this work fine, but it's asking me user and password and because we'll deploy the code with CI/CD I'd prefer use ssh and use the stored ssh keys...
when I replace this
for this
or
this doesn't work
I've also tried add my package in the pyproject.toml
here the error is this
what would be the best way to include my private git repo here? thank you guys, best regards.
perobertson commentedon Sep 4, 2021
In your GitLab CI job you could try something like this
That way you can keep the ssh config and then the CI job would use a temporary token to access the repo with the same permissions as whoever runs the job.
You may need to try different values for
ssh://git@ssh.gitlab.comdepending on how you added it topyproject.tomlphuong commentedon Dec 14, 2021
In my case
Tried:
poetry add git+https://github.com/karantan/ansible.git@v2.6.0.1Got:
Command '['git', 'config', '-l']' returned non-zero exit status 128.My directory
My git is a submodule, i need to move .git to other name to make it work.
Any idea for git submodule issue?
github-actions commentedon Mar 2, 2024
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.