2016-07-25 16:40 GMT+02:00 Dale Henrichs <dale.henrichs@gemtalksystems.com>:
On 7/25/16 6:40 AM, Thierry Goubier wrote:
Hi Dale,
what I'd like is a way to detect if credentials are necessary on a https repo, and add (or ask for them) at the smalltalk level.
Well the user should know from the get-go that they are using a private repo and if they supply an https: scheme then you can pretty much know that sooner or later you will need credentials
Ok.
It would then be easy to handle that in the https url. Would anyone know
how to do that with Zn?
Take a look at MetacelloPharo30Platform>>downloadJSON:username:pass: for and example of how to download with HTTPS credentials using Zinc.
I'll have a look. I tried a few urls(*) on Sean bitbucket example, and the difficulty is that base access to the repository is open (without authentication) and I need to understand how git create a push request to generate an url triggering an authentication :( (*) the response I got on those seems to be a login page instead of an authentication request :(
I know git has some kind of credentials cache for https, but I don't know how to use it.
Yeah the git credentials man page isn't quite as useful as you'd like :) I think that the solutions are os/platform dependent and IIRC none of them are convenient ...
In fact it gives a few hints to solve the problem outside Pharo :) Thierry
Dale