
Daniel James
On 28 October 2013 13:23, Julian Gonggrijp
wrote: Beman Dawes wrote:
To test the modular boost docs I'm writing, I did this:
git clone --recursive https://github.com/boostorg/boost.git modular-boost cd modular-boost ./bootstrap.sh ./b2 headers cd libs/system git checkout develop # did a simple edit of one file git commit -a -m "my bug fix" git push origin develop
Everything ran as expected until the last step, which resulted in this:
Username for 'http://github.com':
That's a problem. Authentication needs to happen automatically.
What steps did I miss?
You probably want to use git@github.com:boostorg/boost.git as the remote URL. You will then authenticate automatically with your public key (assuming you have push access to boostorg).
He's trying to push a submodule, not the main repo. The urls of the submodules are set in the super-project, so the user can't choose them.
Well, that's not strictly true. Being able to make such adjustments is part of the reason for the separation between git submodule init and git submodule update. After init you can go in to .gitmodules and edit URLs, etc. I admit that can be painful compared to just doing a recursive clone.
The super-project can't use github's git urls as they don't allow anonymous access. I believe the super-project should be using https for submodules, rather than http.
Why is that? Because it's possible to commit through https?
That can probably be fixed in Boost2Git.
No problem, if that's the right answer. I think you just need to edit https://github.com/ryppl/Boost2Git/blob/master/src/git_repository.cpp#L106 But won't someone complain that they can't access https behind their corporate firewall? It always seems like there's no right answer in this territory.
Passwords for https can be stored using password caching:
https://help.github.com/articles/set-up-git#password-caching
But if you'd rather use git urls in order to use your ssh key, you can use git's 'insteadOf' configuration option.
Oh, nifty; I didn't know about this! http://stackoverflow.com/questions/1722807/git-convert-git-urls-to-http-urls https://coderwall.com/p/sitezg Given the propensity of various access methods to fail for various reasons, I think we probably ought to suggest the use of insteadOf right in the instructions, no matter how we decide to write the URIs. -Dave