On 7/25/16 7:50 AM, Thierry Goubier wrote:


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 :(
ah yes of course ... thus the need to use git credentials[1] ... Okay, I found GitHub documentation for "Caching Your GitHub password" for linux[2], windows[3], mac[4], and all[5]. these solutions are git-specific and not github specific so they should work for bitbucket just as well ...

Dale

[1] https://git-scm.com/docs/gitcredentials
[2] https://help.github.com/articles/caching-your-github-password-in-git/#platform-linux
[3] https://help.github.com/articles/caching-your-github-password-in-git/#platform-windows
[4] https://help.github.com/articles/caching-your-github-password-in-git/#platform-mac
[5] https://help.github.com/articles/caching-your-github-password-in-git/#platform-all