# Mercurial clone repository hangs

**URL:** <https://forum.ansible.com/t/mercurial-clone-repository-hangs/15309>\
**Category:** Ansible Project\
**Created:** [May 23, 2014, 2:25am UTC](https://forum.ansible.com/t/mercurial-clone-repository-hangs/15309 "2014-05-23T02:25:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![linbo\_liao](https://avatars.discourse-cdn.com/v4/letter/l/c67d28/32.png) [@linbo\_liao](https://forum.ansible.com/u/linbo_liao)\
**Post date:** [May 23, 2014, 2:25am UTC](https://forum.ansible.com/t/mercurial-clone-repository-hangs/15309/1 "2014-05-23T02:25:38Z")

</div>

Haven’t used hg, but for git, two solutions:

1. add password in repo url, like: [https://bbusername:password@bitbucket.org/username/my-repo](https://bbusername@bitbucket.org/username/my-repo)

2. setup ssh key, git module has ssh key option.

Now I am searching a solution to pass the password from terminal, like enter ssh password in terminal when use ansible -u user -k, but no idea how to solve it.

Thanks,  
Linbo

在 2013年5月9日星期四UTC+8下午4时27分09秒，Niels Dequeker写道：

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [May 23, 2014, 12:32pm UTC](https://forum.ansible.com/t/mercurial-clone-repository-hangs/15309/2 "2014-05-23T12:32:45Z")

</div>

The git module contains some logic to auto-accept the hostkey.

Looks like you’ll need to manually add it before the checkout since this hasn’t been added there yet.

(Pull requests would be welcome - take a look at the git module for details).
