My favorites | Sign in
Project Home Wiki Issues Source
Search
for
MercurialFAQ  
Frequently asked questions about Mercurial.
Mercurial
Updated Sep 11, 2011 by augie@google.com

Mercurial FAQ

Why do I get "HTTP Error 405: Method Not Allowed" from the Mercurial client?

$ hg push
pushing to http://...
searching for changes
abort: HTTP Error 405: Method Not Allowed

You must push over https rather than http, e.g. hg push https://code.google.com/p/MYREPO. If you clone via https initially, then a plain hg push will work. To fix this if you already cloned via http, edit .hg/hgrc and change the path there.

How can I avoid typing my password in for each hg push?

You can enter a default push URL in your hgrc configuration file, and include the username and password in the URL. The Mercurial FAQ has an entry on this. If you do this, make sure your hgrc isn't readable by others!

Why isn't my username/password accepted?

If you enter your username as part of the URL, you have to encode the "@" sign as "%40" to avoid confusing Mercurial. If you're on windows, % is an escape character in the command prompt, so you have to encode the "@" sign as "%%40".

The above instructions are only relevant to non-gmail users; gmail users can use the username part of their email address, the part preceding the "@" sign, as their Google Code username.

How do I reset my repository?

Project owners can click the "reset" link at the bottom of the checkout page. This is useful if you accidentally committed sensitive information to the repository or if you want to push from an unrelated repository.

How do I remove sensitive information from my repository?

There is no way to change the contents of a revision without changing the identifier of that revision and all subsequent ones. So you can't silently change history; the best you can do is convince other project participants to forget about the old revisions and accept your replacement revisions.

With those caveats stated, the basic process is to prepare a new repository locally, reset the repository on Google Code, and push your new repository. The following external pages give some pointers on how to prepare a local repository that eliminates a given sensitive revision or file:

Why should I create a server-side clone?

Personal user clones are a copy of a project's repository and can be created by anyone that wants to contribute to a project. They are particularly useful because they do not require the project owner's permission, but confer the same abilities that owners have over the project's repository (e.g. commit, push, etc.).

Personal user clones are also useful for publishing changes to a public location and sharing them with other developers, before they are committed to the main project's repository. Once changes in a user clone have been reviewed, they are usually merged back into the mainline project with the aid of the canonical project's contributors.

User clones aren't forks, in the traditional sense, where a fork has little intention to contribute back to the original project. Rather, the entire purpose of a user clone is to allow users to contribute to projects without requiring official commit access permissions. Because mercurial is a distributed (peer-to-peer) version control system, it excels at branching and merging. If the project maintainers like the new code, they just "pull" the changesets from the clone and merge them into an official project repository. It's all much more elegant than emailing patches back and forth, anonymous contributors get to use the same tools as core developers.

Comment by fccoelho, Jun 22, 2009

Why am I getting an Authorization failed when trying to push to mercurial via https? I am using my gmail username and pw

Comment by Jacob.Frelinger@gmail.com, Jun 23, 2009

fccoelho, you need to use the generated password googlecode provides you, not your gmail password. you're googlecode password is under your profile on the settings tab.

Comment by pad...@gmail.com, Jul 16, 2009

Can anyone tell me where can I request that my mercurial repository is reset to a clean state (without any checkins)? I've made a mistake in importing the repository and I'd like to make it right. Thanks!

Comment by qian.qiao, Jul 30, 2009

@padcom:

navigate to: http://code.google.com/p/<YOUR_PROJECT>/source/browse/

at the bottom of that page, you will see this sentence: You can reset this repository so that hg push can be used to upload from a different repository.

Click the "reset this repository" bit, answer an trivial question, and voila.

Comment by TongShen...@gmail.com, Sep 13, 2009

Why do I get this error when pushing through https: 'abort: error: software caused connection abort'?

Comment by dbori...@gmail.com, Oct 20, 2009

>>Comment by TongShen?.Martin, Sep 13, 2009 >>Why do I get this error when pushing through https: 'abort: error: software caused connection abort'?

I have same error using Vectrace Mercurial Eclipse.

Comment by intland....@gmail.com, Jan 13, 2010

Recently we made a short 4-min video to show the basics of working with Mercurial repositories on Google Code, using Eclipse. It demonstrates cloning repos, making changes, committing them and then pushing the change sets up to Google Code.

The video is available in HD here: http://blogs.intland.com/main/entry/39

Comment by victor.p...@gmail.com, Jan 25, 2010

I try commit using my victor.perez@e-evolution.com account from my google domains but I get follow error

Pushing to https://victor.perez%40e-evolution.com:***@adempiere.googlecode.com/hg/

searching for changes about: authorization failed , error code : 255

victor.perez@e-evolution.com account was added as owner

kind regards Victor Perez

Comment by napper...@gmail.com, Jan 30, 2010

Why does it take an extremely long time (around 10 mins) for the authentication prompt to appear when pushing changes?

Comment by godspeed...@gmail.com, Mar 2, 2010

Strange... Not only was I never prompted for a UN/PW... But the repository downloaded just fine. Even though it said it was uploading my clone to the server, there appears to be no record of me in the Google Code repository.

Comment by tart...@gmail.com, Jun 1, 2010

The 'reset this repository' link described above no longer exists. It is no longer required.

To push your existing local Mercurial repository (including project history) into a newly-created googlecode Mercurial repository:

  • Create the googlecode project, with a Mercurial repo
  • From your local existing repo, run hg push https://<PROJECTNAME>.googlecode.com/hg
  • In order to make future invocations of hg push know to push to googlecode by default, edit your local repo's .hg/hgrc file (you might need to create a new file), and add the lines:
  • [paths]
    default-push = https://<PROJECTNAME>.googlecode.com/hg
Comment by kyberneticist@gmail.com, Jun 23, 2010

"This revision affected a large number of files. Only a subset of 50 changed paths are being shown. To see all changed paths, use the svn log command-line."

Is displayed on a large changeset. We are using mercurial.

Comment by nero.fra...@gmail.com, Jun 27, 2010

How can i add commiter users for a clone project ? Is it possible?

Comment by grusz...@gmail.com, Oct 8, 2010

If I would like to have branches for different releases of my software, what is the suggested way on google code's mercurial repo? If I had my own, I guess I would try to create seperate repo for every release, but here I can't do that. What should I do?

Comment by lgong1...@gmail.com, Nov 11, 2010

Why I got "abort: HTTP Error 403: Forbidden" after entering user name and password

Comment by besisland, Dec 5, 2010

gruszczy, you should use Mercurial’s branches: hg branch

Comment by jamesbon...@gmail.com, Dec 13, 2010

I get this error abort: HTTP Error 403: Forbidden

Comment by mightydr...@gmail.com, Dec 13, 2010

403 error comes because of wrong password. The password you give in hg is not same as your gmail password. Read the complete thing here http://mightydreams.blogspot.com/2010/12/project-hosting-with-google-code.html

Comment by baiyo...@gmail.com, Dec 17, 2010

please go to url:https://code.google.com/hosting/settings, then you will find the password.

Comment by martinburke.dev@gmail.com, Jan 13, 2011

If you want Mercurial to accept your google un/pw, you need to click on Profile -> Settings and then check the box for "Accept @gmail.com" Google Account password when using a Mercurial client. This fixed the 403 error for me :)

Comment by b...@ticm.com, Feb 14, 2011

Cloning works fine for me, but pushing seems to always timeout.

BTW using '%40' on the URL no longer works - you should use '@' just like a normal URL.

Comment by dart...@gmail.com, Feb 25, 2011

How to remove a clone?

Comment by apl...@gmail.com, Mar 30, 2011

Can I contribute to a clone of someone else?

I have write access to the main repository but I am getting HTTP Error 403: Forbidden for the clone of a colleague. I am using a correct username/password.

Comment by Davidraf...@gmail.com, Apr 2, 2011

I am getting 403 error and I am using https:// I am sure the 's' is there, why do I get 403 error?

Thanks

Comment by Davidraf...@gmail.com, Apr 2, 2011

EDIT: I did use the password I found here:

https://code.google.com/hosting/settings

Comment by Acer.Kin...@gmail.com, May 17, 2011

Dear all,

I am not able to create a clone of the project repository. The error message I get is:

% hg clone --verbose https://Acer.King.Wei@layout.biographer.googlecode.com/hg/ biographer-layout -- . abort: layout.biographer.googlecode.com certificate error: certificate is for .googlecode.com, googlecode.com, .codespot.com, .googlesource.com, googlesource.com (use --insecure to connect insecurely) returned code 255 Tue May 17 21:17:08 2011?

Can anyone tell me how to solve it?
Thank you !
Comment by VladD2.rsdn.ru, May 26, 2011

Why I can't add comments a prsonal clone (where I not owner)? It's is not useful.

Comment by blokeley@gmail.com, Jun 13, 2011

@Acer.Kin... You can't make an clone of any hg repository which has more than one subdomain on Google Code because their certificate only covers one subdomain (one.googlecode.com), not (two.one.googlecode.com) etc.

This also breaks the wiki hg repositories on Google Code. There is an open issue for it on Google Code's issue list.

Comment by andrei.d...@gmail.com, Jul 26, 2011
Comment by leonardoconstrutoresdapaz, Oct 11, 2011

what that mensage "aviso: o certificado code.google.com com impressão digital d2:33:75:af:62:64:5b:75:dc:3f:bf:22:30:b6:27:13:ff:3f:90:fd não foi verificado (verifique as opções de configuração hostfingerprints e web.cacerts)"?

Comment by hta...@ut.ee, Oct 13, 2011

pushing to https://htamme:***@code.google.com/p/kindred searching for changes abort: HTTP Error 403: Forbidden

I use the password I found here: https://code.google.com/hosting/settings

I can push if I add password manually.

My hgrc file:

ui

username = first last <htamme@ut.ee> verbouse = True

paths

default = https://htamme:super_secret_passwd%40ut.ee@code.google.com/p/kindred

hostfingerprints

code.google.com=d2:33:75:af:62:64:5b:75:dc:3f:bf:22:30:b6:27:13:ff:3f:90:fd

Hg verion : Mercurial Distributed SCM (version 1.7.5)

Comment by huang.c...@gmail.com, Nov 12, 2011

Why do I keep receiving "abort: error: An existing connection was forcibly closed by the remote host" when trying to get a local copy by "hg clone https://huang.cong@code.google.com/r/huangcong-html5wow-repo/".

Thanks

Comment by marya...@vcn.bc.ca, Feb 13, 2012

Do I need a password to create a master repository clone?

Where is the command line that I have to type in to get a local copy of the clone?

Comment by byzh...@gmail.com, Mar 3, 2012

How to make a server side clone sync with the main repository when some are changed in the main after the clone is created.


Sign in to add a comment
Powered by Google Project Hosting