mercurial - Change upstream of local (hg-git) clone from (github) original to fork -
i discovered oss project i've contributed had moved github. installed hg-git , cloned local repo git:// url; made changes.
i realized wanted own github fork, made one; haven't been able figure out quite how switch existing local repo. i've changed local repo settings use git:// url of fork, , can pull; can't push changes up. tells me use https:// url, when make change, can neither pull nor push -- error 406, "not acceptable."
the work done in local repo minimal, can redo it, it'd simpler if local repo , fork connect now.
update
i've installed github windows manage ssh key. generated key (github_rsa) , attached github account.
i edited hgrc file , added [ui]ssh= setting pointing local git 'ssh' command (buried down in %appdata%\local\github).
with this, if go "git-shell" window, guess spawns ssh-agent, can enter commands such "hg incoming" , connection made. i've got remote repo url right, , within git-shell ecosystem, i've got ssh keys set right.
from regular cmd.exe window, same command yields "permission denied (publickey)". tortoisehg, same error appears when try "incoming" action. i'd prefer keep using tortoisehg, i'm not sure how use ssh.
final update
for reason, tortoiseplink doesn't want play github's ssh server, @ least not github-for-windows-generated key. still have github windows installed (not bad thing, superfluous wanted do).
to hg , tortoisehg connect, had modify project settings:
[ui] ssh = %userprofile%\appdata\local\github\<salt>\bin\ssh -i %userprofile%\.ssh\github_rsa that is: point ssh command, installed portable github, , specify github-generated key on command line. configuration, don't need ssh-agent running.
you need push via ssh, meaning need push via:
hg push git+ssh://git@github.com/<login>/<repo> note usage of git@ instead of login in first part of url. matters; server figure out credentials via supplied ssh key.
you may have add ssh key github account first (per step 4 of page).
this assumes created fork of original github repository via github ui; pushing empty repository hg-git may require additional steps.
Comments
Post a Comment