Mercurial push, abort: authorization failed

后端 未结 8 1782
悲哀的现实
悲哀的现实 2021-01-31 14:14

I\'m having problems with pushing to mercurial repository:

$ hg push
pushing to https://user:***@hg.domain.com/X_repo
searching for changes
abort: authorization          


        
8条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-31 15:02

    My problem was a bit different. Password change triggered it... And I had a repo/.hgrc and a repo/.hg/hgrc. Not sure why, but these were conflicting.

    For the record, the cleanest way I've found is to keep a global configuration file (on Windows C:\Users\\mercurial.ini or Linux /home//.hgrc) with all the configuration that applies to all repositories (profiles, plugins/extensions, repos, etc), and then per repo, just use something like:

    [paths]  
    default = https://path/to/remote/repo
    
    # any other repo-specific config
    

    Why I had another repo-specific mercurial config file, I don't know -- now everything is cleaned up and working nicely.

提交回复
热议问题