# Specify credentials in hg command line

**URL:** <https://community.cloudogu.com/t/specify-credentials-in-hg-command-line/1390>\
**Category:** SCM-Manager (General)\
**Created:** [September 27, 2024, 10:16pm UTC](https://community.cloudogu.com/t/specify-credentials-in-hg-command-line/1390 "2024-09-27T22:16:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jsgro](https://dub1.discourse-cdn.com/flex013/user_avatar/community.cloudogu.com/jsgro/32/1472_2.png) [@jsgro](https://community.cloudogu.com/u/jsgro)\
**Post date:** [September 27, 2024, 10:16pm UTC](https://community.cloudogu.com/t/specify-credentials-in-hg-command-line/1390/1 "2024-09-27T22:16:59Z")

</div>

Hi,  
How can i specify user/pass when calling hg from command line?  
I currently can’t find a way around it stating "http authorization required " and then prompting for user/pass input. How can i specify credentials in config or even within the command line call?  
I’ve tried a few things but nothing has worked, such as this method:  
hg --config auth.rc.username=user --config auth.rc.password=pass pull

Thanks,

---

<div class="post-metadata">

**Author:** ![pfeuffer](https://dub1.discourse-cdn.com/flex013/user_avatar/community.cloudogu.com/pfeuffer/32/72_2.png) [@pfeuffer](https://community.cloudogu.com/u/pfeuffer)\
**Post date:** [September 30, 2024, 6:47am UTC](https://community.cloudogu.com/t/specify-credentials-in-hg-command-line/1390/2 "2024-09-30T06:47:57Z")

</div>

Hi @jsgro ,

you can take a look here: [https://www.selenic.com/mercurial/hgrc.5.html#auth](https://www.selenic.com/mercurial/hgrc.5.html#auth)

It looks like you have to put `rc.prefix` and `rc.schemes`, too, so that hg knows which credentials are to be used. Hope this works for you!

Have a nice day!

---

<div class="post-metadata">

**Author:** ![jsgro](https://dub1.discourse-cdn.com/flex013/user_avatar/community.cloudogu.com/jsgro/32/1472_2.png) [@jsgro](https://community.cloudogu.com/u/jsgro)\
**Post date:** [October 1, 2024, 9:50pm UTC](https://community.cloudogu.com/t/specify-credentials-in-hg-command-line/1390/3 "2024-10-01T21:50:31Z")

</div>

ah, thanks. got it working.  
the schemes is the piece we were missing.
