0

I am working on setting up auto deployment script using Python Fabric on EC2 instance. We are already having code repositories cloned on EC2 instance with HTTPS (without user name,https://bitbucket.org/) instead of SSH.

If we clone the repositories using SSH, it will solve my problem for now. But, I just wanted to know if following is possible:-

After connecting to remote EC2 instance using Fabric, if my next command is hg clone, it asks for user name and password. I have to type this two things manually on command prompt. Is there any way we can pass these values run time automatically?

Thanks!

1 Answers1

0

You can use ssh keys and connect using the ssh+hg protocol. It'll auth w/o password if you set that up.

Morgan
  • 4,143
  • 27
  • 35
  • Thanks Morgan. As I have mentioned earlier, I can do this. But I wanted to know is there any way we can do this automatically? This will help me in few other scripts as well. Thanks again. – user2030417 Feb 07 '13 at 21:43
  • what's "this", setting up the keys? Or doing some pexpect stuff for prompts? – Morgan Feb 07 '13 at 21:47
  • this= ssh+hg. But I wanted to know if there is way to pass, run time values on EC2 instance from Python Fabric? – user2030417 Feb 07 '13 at 21:59
  • hmm perhaps more info is needed. But there is also boto for ec2 api usage. There are also a lot of ec2+fabric questions answered here. What specifically do you need to pass? You can use put() to move files. – Morgan Feb 07 '13 at 22:21
  • For now, I just wanted to pass user_name and password for hg pull for repository cloned using HTTPS. – user2030417 Feb 08 '13 at 20:45