Skip to content
代码片段 群组 项目
未验证 提交 9ae869cb 编辑于 作者: Russell Dickenson's avatar Russell Dickenson 提交者: GitLab
浏览文件

Merge branch 'hacks4oats-master-patch-89dc' into 'master'

Add Python package resolution troubleshooting

See merge request https://gitlab.com/gitlab-org/gitlab/-/merge_requests/147498



Merged-by: default avatarRussell Dickenson <rdickenson@gitlab.com>
Co-authored-by: default avatarCleveland Bledsoe Jr <cbledsoe@gitlab.com>
Co-authored-by: default avatarOscar Tovar <otovar@gitlab.com>
No related branches found
No related tags found
无相关合并请求
......@@ -239,3 +239,16 @@ This has been resolved in `gemnasium-python` where `openssh-client` is pre-insta
1. Use absolute paths (`/root/.ssh/known_hosts` instead of `~/.ssh/known_hosts`) when setting up keys and hosts.
1. Add `UserKnownHostsFile` to your `ssh` config specifying the relevant `known_hosts` files, for example: `echo 'UserKnownHostsFile /tmp/.ssh/known_hosts' >> /etc/ssh/ssh_config`.
## `ERROR: THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE`
This error occurs when the hash for a package in a `requirements.txt` file does not match the hash of the downloaded package.
As a security measure, `pip` will assume that the package has been tampered with and will refuse to install it.
To remediate this, ensure that the hash contained in the requirements file is correct.
For requirement files generated by [`pip-compile`](https://pip-tools.readthedocs.io/en/stable/), run `pip-compile --generate-hashes` to ensure that the hash is up to date.
If using a `Pipfile.lock` generated by [`pipenv`](https://pipenv.pypa.io/), run `pipenv verify` to verify that the lock file contains the latest package hashes.
## `ERROR: In --require-hashes mode, all requirements must have their versions pinned with ==`
This error will occur if the requirements file was generated on a different platform than the one used by the GitLab Runner.
Support for targeting other platforms is tracked in [issue 416376](https://gitlab.com/gitlab-org/gitlab/-/issues/416376).
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册