0

I need to run on the jenkins groovy script from a repository, that requires authentication. I can access this script using:

curl -u login:pass http://some-groovy-script.groovy

And I run on jenkis any script, that doesn't requires authentication:

java -jar jenkins-cli.jar -s http://jenkins/ groovy http://some-groovy-script.groovy

But it doesn't work if scripts repository requires authentication, I get error 401.

Is there any way to combine this two actions in one and execute script on jenkins?

Jane Morazi
  • 39
  • 1
  • 5
  • Not clear what you exactly need. If any repository require authentication, then how can Jenkins be an exception in that case? – Akhil Sep 25 '14 at 14:07

1 Answers1

0

If you could access repository using ssh, then try configuring dropping ssh keys for the repo in jenkins user's ~/.ssh/ directory and configuring ~/.ssh/config for the jenkins user

Pushkar
  • 541
  • 4
  • 18