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
{{ message }}
This repository has been archived by the owner on Oct 1, 2020. It is now read-only.
This is my application definition. All code is in a private GIT server, so I need to use application_git cookbook who provides deploy_key resource to checkout code successfully.
application "/data/envs/app_name" do
application_git "/data/envs/app_name" do
repository "[email protected]:atomic/app_name.git"
revision 'develop'
deploy_key key
end
virtualenv
pip_requirements "/data/envs/app_name/requeriments/development.txt"
django do
database do
engine 'mysql'
username 'someuser'
password 'somepassword'
host 'localhost'
end
end
gunicorn do
app_module 'django'
port 8100
timeout 800
end
end
So far, so good. The problem arise when pip_requirements finds this line into requeriments/development.txt, who points to an egg archive into another private GIT repo:
In this case, the command fails because lack of permissions in the GIT repo
Permission denied, please try again.
Permission denied, please try again.
Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Command "git clone -q ssh://[email protected]/atomic/puzzlequestserver.git /data/envs/app_name/.virtualenv/src/pqs" failed with error code 128 in None
---- End output of ["/data/envs/app_name/.virtualenv/bin/python", "-m", "pip.__main__", "install", "--requirement", "/data/envs/app_name/requeriments/development.txt"] ----
Ran ["/data/envs/app_name/.virtualenv/bin/python", "-m", "pip.__main__", "install", "--requirement", "/data/envs/app_name/requeriments/development.txt"] returned 1
How can I install this egg if cookbook don't provides this functionality ?
The text was updated successfully, but these errors were encountered:
You have to solve this the same way you normally would with pip install -r. Usually this is through an SSH config file, but you could also use the GIT_SSH environment variable.
As this is one of the first results when searching on the topic, I wanted to note that pip_requirements doesn't appear to recognize the application's environment attribute and has no way to accept any directly (poise/poise-python#77). Perhaps because of how python_shell_out works?
In order to use GIT_SSH, I had to replicate a pip install using python_execute in conjunction with a deploy wrapper script and key instead of using pip_requirements at all.
and .ssh_deploy_key is an SSH key used for deployment with your private repository.
The wrapper is necessary as git will try to use the entire value of GIT_SSH as a command instead of a command with arguments. You may need to adjust permissions and directories according to your setup.
Note that this executes on every Chef client run, so it sends a restart to every service on every Chef client run. This may also not be acceptable for your purposes.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
This is my application definition. All code is in a private GIT server, so I need to use application_git cookbook who provides deploy_key resource to checkout code successfully.
So far, so good. The problem arise when pip_requirements finds this line into requeriments/development.txt, who points to an egg archive into another private GIT repo:
In this case, the command fails because lack of permissions in the GIT repo
How can I install this egg if cookbook don't provides this functionality ?
The text was updated successfully, but these errors were encountered: