[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Openshift Origin using ssh key (secret) inside a build





Le 2 février 2016 à 14:28, Johary RAVELONJATOVO <johary icloud com> a écrit :



Le 2 février 2016 à 14:21, Johary RAVELONJATOVO <johary icloud com> a écrit :

I saw the doc today and try to use it but my origin was not up to date :p.

I try it once I update Origin (There's a lot of change) but I still have the same issue.
77 E0202 22:21:36.306788 1 util.go:91] Host key verification failed.
78 E0202 22:21:36.306798 1 util.go:91] fatal: Could not read from remote repository.
79 E0202 22:21:36.306804 1 util.go:91] Please make sure you have the correct access rights
80 E0202 22:21:36.306809 1 util.go:91] and the repository exists.
 Here are my build config secret part 
"source": {
"type": "Git",
"git": {
"uri": "ssh://git xxxxxxxxxxxxxxxxxx git"
},
"sourceSecret": {
"name": "scmsecret"
},
"secrets": [
{
"secret": {
"name": "scmsecret"
},
"destinationDir": "."
}
]
},
"strategy": {
"type": "Source",
"sourceStrategy": {
"from": {
"kind": "ImageStreamTag",
"name": "php-55-centos7:latest"
}
}
},
"output": {
"to": {
"kind": "ImageStreamTag",
"name": "crakrevenue-admin:latest"
}
},
"resources": {}


The "scmsecret" is my secret test key from ssh-key. Is there something that I'm doing wrong? 

Thanks, 

Le 2 février 2016 à 12:29, Ben Parees <bparees redhat com> a écrit :

we've just added a feature which allows you to inject secrets into the build process so they are available during the "assemble" invocation, which sounds like what you need.  You'll need to be on the latest origin (the code just dropped in the last week or so), here are the docs:

https://docs.openshift.org/latest/dev_guide/builds.html#using-secrets

Once you setup the build to inject your secret value, you can modify your assemble script to use it when invoking composer.


On Tue, Feb 2, 2016 at 3:07 PM, Johary RAVELONJATOVO <johary icloud com> wrote:
Hi everyone,

I actually try to deploy a symfony 2 project with OpenShift Origin. The source code of my project is on a private repository and I have create a secret with my ssh key to access on it "private-repo-secret". With that I have no problem to access on the source code with OpenShift Origin. 
After that I create a STI custom image, which detects if there's a composer.json on the project and if so it launched "composer install" command.

I made some test and it works. It detects the composer.json and after that it launches the "composer install" command.

The problem is when it did the "composer install", it's correct with public dependencies but not with private. I got an issue with ssh key because it needs the "private-repo-secrets" during the build with "composer install" 



_______________________________________________
users mailing list
users lists openshift redhat com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users




--
Ben Parees | OpenShift


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]