Hi Esteban, Thanks for the reply, I will test all this as soon as I can and report back. However, in your final script, are you sure the host (or port) can be specified (so no defaulting to GitHub.com). Also, I was reading the implementation (hard), and it seemed as if the only real solution would be to make a new type (scheme), for this case, like githttps://user1:passw1@server.company.com/scm/bla/foo-pharo.git which would then preserve the username/password/host/port and do the proper thing directly. IIUC, https git URLs are described as the most common ones. It might be that there is then still a problem with branches/tags, but maybe they are not needed. Sven
On 29 Oct 2019, at 11:07, Esteban Lorenzano <estebanlm@gmail.com> wrote:
Hi Sven,
You are facing two different problems at the same time :) 1) a problem with Metacello api. There is a mismatch between git and metacello because the apis are not equivalent (specially having iceberg in the middle). If you want to use HTTPS in metacello you have to explicit you want to use HTTPS, but you still has to use the GitHub:// identifier.
If you execute first:
./pharo build.image eval --save "Iceberg remoteTypeSelector: #httpsUrlâ
Then your execution:
./pharo build.image metacello install github://svenvc/ztimestamp BaselineOfZTimestamp
Will work without warnings.
Now, you have another problem: 2) You cannot use an url as this with iceberg/metacello: https://deploy:secret@.../scm/xyz/xyz-pharo.git And yes, we could do a parse of it and use it (also solving your metacello command problem), but this is not easily doable and it would take time. The usual way of doing this is not using HTTPS but distributing public/private keys (then you use the regular SSH protocol). But if you still want/need to use HTTPS, then you need to provide your plaintext credentials. For iceberg, your credentials are stored in your preferences directory, at credentials.fuel (so you could add them to your CI server, if you have them). To add them programatically you need to do something like this:
./pharo build.image eval --save "IceCredentialStore current storeCredential: (IcePlaintextCredentials new username: 'esteban'; password: 'secret'; yourself) forHostname: âgithub.comâ"
Then you full script will be like this:
./pharo build.image eval --save â Iceberg remoteTypeSelector: #httpsUrlâ. IceCredentialStore current storeCredential: (IcePlaintextCredentials new username: 'esteban'; password: 'secret'; yourself) forHostname: 'github.com' â ./pharo build.image metacello install github://svenvc/ztimestamp BaselineOfZTimestamp
I hope this solves your problem :)
Esteban
On Mon, Oct 28, 2019 at 11:58 AM Sven Van Caekenberghe <sven@stfx.eu> wrote: I am still at a loss with this issue.
When loading from github://svenvc/ztimestamp using Metacello (see original mail) the code in MCGitBasedNetworkRepository>>#createIcebergRepositoryWithFallbackFor:url: clearly switches to using https://github.com/svenvc/ztimestamp.git - I traced it.
So obviously, Pharo 7 is capable of accessing it.
However, starting directly with https://github.com/svenvc/ztimestamp.git I end up in a totally different place. Why ?
This code is so complex...
On 25 Oct 2019, at 14:49, Sven Van Caekenberghe <sven@stfx.eu> wrote:
Hi,
I asked this before, but I still have trouble with this.
What I ultimately want is what I used for years now: use the zero config tools to point to my private repo and install my code and all its dependencies from a single Metacello config.
Basically,
$vm $image config _CONFIG_REPO_ _CONFIG_NAME_ --username=_CONFIG_USER_ --password=_CONFIG_PASS_ --install=_CONFIG_VERSION_ --group=_CONFIG_GROUP_
towards a private server.
In the new world of git(hub)/tonel/iceberg I am trying the following (not using the 'config' but the new 'metacello' command line handler):
$ uname -a Linux audio359 4.15.0-39-generic #42-Ubuntu SMP Tue Oct 23 15:48:01 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
$ curl get.pharo.org/64/70+vm | bash % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 3054 100 3054 0 0 57622 0 --:--:-- --:--:-- --:--:-- 57622 Downloading the latest 70 Image: http://files.pharo.org/get-files/70/pharo64.zip Pharo.image Downloading the latest pharoVM: http://files.pharo.org/get-files/70/pharo64-linux-stable.zip pharo-vm/pharo Creating starter scripts pharo and pharo-ui
$ ./pharo Pharo.image printVersion [version] 'Pharo7.0.4' 'Pharo-7.0.4+build.168.sha.ccd1f6489120f58ddeacb2cac77cd3a0f0dcfbe6 (64 Bit)'
$ ./pharo Pharo.image save build
$ ./pharo build.image metacello install github://svenvc/ztimestamp BaselineOfZTimestamp
3. using HTTPS instead SSH (Just use an url in the form HTTPS://etc.git). I will try to clone the HTTPS variant. Fetched -> BaselineOfZTimestamp-CompatibleUserName.1554735117 --- https://github.com/svenvc/ztimestamp.git[master] --- https://github.com/svenvc/ztimestamp.git[master] Loaded -> BaselineOfZTimestamp-CompatibleUserName.1554735117 --- https://github.com/svenvc/ztimestamp.git[master] --- https://github.com/svenvc/ztimestamp.git[master] Loading baseline of BaselineOfZTimestamp... Fetched -> ZTimestamp-CompatibleUserName.1554735117 --- https://github.com/svenvc/ztimestamp.git[master] --- https://github.com/svenvc/ztimestamp.git[master] Loaded -> ZTimestamp-CompatibleUserName.1554735117 --- https://github.com/svenvc/ztimestamp.git[master] --- cache ...finished baseline
$ ./pharo build.image eval ZTimestamp now 2019-10-25T12:28:34Z
So although it gave a warning, it worked fine.
The warning said,
using HTTPS instead SSH (Just use an url in the form HTTPS://etc.git). I will try to clone the HTTPS variant.
so let's try that after cleaning everything:
$ rm -rf pharo-local/ build.*
$ ./pharo Pharo.image save build
$ ./pharo build.image metacello install https://github.com/svenvc/ztimestamp.git BaselineOfZTimestamp
...RETRY->BaselineOfZTimestamp ...RETRY->BaselineOfZTimestamp ...FAILED->BaselineOfZTimestampCould not resolve: BaselineOfZTimestamp [BaselineOfZTimestamp] in /home/sven/pharo7/pharo-local/package-cache https://github.com/svenvc/ztimestamp.git MetacelloFetchingMCSpecLoader(MetacelloCommonMCSpecLoader)>>retryingResolvePackageSpecReferences:gofer:
WTF ? Why does this not work (I can perfectly git clone that URL) ?
Of course, this would just be the first step, eventually I want to use my own private server with a URL like
https://deploy:secret@bitbucket.myserver.be/scm/xyz/xyz-pharo.git
How do you build/deploy non-public production code using the command line ?
Help would be much appreciated.
Sven