adding credentials to a repo via a playground script
Hi, is it possible to add credentials to an existing repo via a script? I've tried something like ~~~~~~~~~~~~~~~~~~~~~~~~~ |repo| repo := MCSmalltalkhubRepository allInstances detect: [ :each | each location includesSubstring: 'Pharo50Inbox' ]. repo user: 'peteruhnak'; password: '******' ~~~~~~~~~~~~~~~~~~~~~~~~~~ but it has no effect. Thanks, Peter
Le 05/03/2016 12:08, Peter Uhnák a écrit :
Hi,
is it possible to add credentials to an existing repo via a script?
I've tried something like
~~~~~~~~~~~~~~~~~~~~~~~~~ |repo| repo := MCSmalltalkhubRepository allInstances detect: [ :each | each location includesSubstring: 'Pharo50Inbox' ]. repo user: 'peteruhnak'; password: '******' ~~~~~~~~~~~~~~~~~~~~~~~~~~
but it has no effect.
Thanks, Peter
MCRepositoryGroup default removeRepository: (MCSmalltalkhubRepository owner: 'Pharo' project: 'Pharo50Inbox'). MCRepositoryGroup default addRepository: (MCSmalltalkhubRepository owner: 'Pharo' project: 'Pharo50Inbox' user: 'peteruhnak' password: '******' ). Not sure you need the remove part but it should de the trick :) -- Cyril Ferlicot http://www.synectique.eu 165 Avenue Bretagne Lille 59000 France
Peter Uhnák wrote
repo user: 'peteruhnak'; password: '******' ... has no effect.
Hmm, I wonder if something changed in 5.0. I do this all the time. In fact I wrote a small tool that picks up the credentials from a config file so I can invoke it from the World menu ----- Cheers, Sean -- View this message in context: http://forum.world.st/adding-credentials-to-a-repo-via-a-playground-script-t... Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Hi sean where is your tool :). Stef Le 5/3/16 18:37, Sean P. DeNigris a écrit :
Peter Uhnák wrote
repo user: 'peteruhnak'; password: '******' ... has no effect. Hmm, I wonder if something changed in 5.0. I do this all the time. In fact I wrote a small tool that picks up the credentials from a config file so I can invoke it from the World menu
----- Cheers, Sean -- View this message in context: http://forum.world.st/adding-credentials-to-a-repo-via-a-playground-script-t... Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
I use QuickAccess to store these things ( http://forum.world.st/ANN-QuickAccess-for-Pharo-5-td4859265.html ) but I still have to figure out a good way to keep it in sync across images. QuickAccess gets autoloaded from a startup script. Peter -----Original Message----- From: "stepharo" <stepharo@free.fr> Sent: â3/â6/â2016 9:26 AM To: "Any question about pharo is welcome" <pharo-users@lists.pharo.org> Subject: Re: [Pharo-users] adding credentials to a repo via a playgroundscript Hi sean where is your tool :). Stef Le 5/3/16 18:37, Sean P. DeNigris a écrit :
Peter Uhnák wrote
repo user: 'peteruhnak'; password: '******' ... has no effect. Hmm, I wonder if something changed in 5.0. I do this all the time. In fact I wrote a small tool that picks up the credentials from a config file so I can invoke it from the World menu
----- Cheers, Sean -- View this message in context: http://forum.world.st/adding-credentials-to-a-repo-via-a-playground-script-t... Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Thanks Peter I watched the video and I got a question. Do you also get the question "would you like to load QuickAccess" How does it work? You have to load first a configurationOfQuickAccess? Stef Le 6/3/16 12:24, Peter Uhnak a écrit :
I use QuickAccess to store these things ( http://forum.world.st/ANN-QuickAccess-for-Pharo-5-td4859265.html ) but I still have to figure out a good way to keep it in sync across images. QuickAccess gets autoloaded from a startup script.
Peter ------------------------------------------------------------------------ From: stepharo <mailto:stepharo@free.fr> Sent: â3/â6/â2016 9:26 AM To: Any question about pharo is welcome <mailto:pharo-users@lists.pharo.org> Subject: Re: [Pharo-users] adding credentials to a repo via a playgroundscript
Hi sean
where is your tool :).
Stef
Le 5/3/16 18:37, Sean P. DeNigris a écrit :
Peter Uhnák wrote
repo user: 'peteruhnak'; password: '******' ... has no effect. Hmm, I wonder if something changed in 5.0. I do this all the time. In fact I wrote a small tool that picks up the credentials from a config file so I can invoke it from the World menu
----- Cheers, Sean -- View this message in context: http://forum.world.st/adding-credentials-to-a-repo-via-a-playground-script-t... Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
The question is from Catalog Browser, I load it automatically directly via Metacello from a startup script, plus it automatically imports my global config for QuickAccess. https://github.com/peteruhnak/pharo-scripts/blob/master/startup/5.0/defaultS... I still need to automate reloading it the config changes though. Peter On Sun, Mar 6, 2016 at 2:34 PM, stepharo <stepharo@free.fr> wrote:
Thanks Peter I watched the video and I got a question. Do you also get the question "would you like to load QuickAccess" How does it work? You have to load first a configurationOfQuickAccess?
Stef
Le 6/3/16 12:24, Peter Uhnak a écrit :
I use QuickAccess to store these things ( http://forum.world.st/ANN-QuickAccess-for-Pharo-5-td4859265.html ) but I still have to figure out a good way to keep it in sync across images. QuickAccess gets autoloaded from a startup script.
Peter ------------------------------ From: stepharo <stepharo@free.fr> Sent: â3/â6/â2016 9:26 AM To: Any question about pharo is welcome <pharo-users@lists.pharo.org> Subject: Re: [Pharo-users] adding credentials to a repo via a playgroundscript
Hi sean
where is your tool :).
Stef
Le 5/3/16 18:37, Sean P. DeNigris a écrit :
Peter Uhnák wrote
repo user: 'peteruhnak'; password: '******' ... has no effect. Hmm, I wonder if something changed in 5.0. I do this all the time. In fact I wrote a small tool that picks up the credentials from a config file so I can invoke it from the World menu
----- Cheers, Sean -- View this message in context: http://forum.world.st/adding-credentials-to-a-repo-via-a-playground-script-t... Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Metacello new repository: 'github://seandenigris/Monticello-Login:master/repository'; baseline: 'MonticelloLogin'; onConflict: [ :ex | ex allow ]; load. It expects a file named .mcconfig in a user-specifiable folder (set with `MlConfigurationFile folder: aFolder`), in the following format: [squeaksource] user := 'SD'. password := 'mypassword'. [squeaksource3] user := 'SeanDeNigris'. password = '12345'. [smalltalkhub] user := 'SeanDeNigris'. password = 'secret'. As you can see, I show my actual passwords in case you need to access my accounts ;-p p.s. it is just a utility for my personal convenience, so no warranty! ----- Cheers, Sean -- View this message in context: http://forum.world.st/adding-credentials-to-a-repo-via-a-playground-script-t... Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
MCRepositoryGroup default removeRepository: (MCSmalltalkhubRepository owner: 'Pharo' project: 'Pharo50Inbox'). MCRepositoryGroup default addRepository: (MCSmalltalkhubRepository owner: 'Pharo' project: 'Pharo50Inbox' user: 'peteruhnak' password: '******' ).
Apparently this doesn't work either. When I execute it it shows correct info in Monticello Browser, but once I actually push to the repo it asks for credentials again⦠so I guess more digging is required. On Sun, Mar 6, 2016 at 5:10 PM, Sean P. DeNigris <sean@clipperadams.com> wrote:
Metacello new repository: 'github://seandenigris/Monticello-Login:master/repository'; baseline: 'MonticelloLogin'; onConflict: [ :ex | ex allow ]; load.
It expects a file named .mcconfig in a user-specifiable folder (set with `MlConfigurationFile folder: aFolder`), in the following format: [squeaksource] user := 'SD'. password := 'mypassword'. [squeaksource3] user := 'SeanDeNigris'. password = '12345'. [smalltalkhub] user := 'SeanDeNigris'. password = 'secret'.
As you can see, I show my actual passwords in case you need to access my accounts ;-p
p.s. it is just a utility for my personal convenience, so no warranty!
----- Cheers, Sean -- View this message in context: http://forum.world.st/adding-credentials-to-a-repo-via-a-playground-script-t... Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Le 07/03/2016 18:21, Peter Uhnák a écrit :
MCRepositoryGroup default removeRepository: (MCSmalltalkhubRepository owner: 'Pharo' project: 'Pharo50Inbox'). MCRepositoryGroup default addRepository: (MCSmalltalkhubRepository owner: 'Pharo' project: 'Pharo50Inbox' user: 'peteruhnak' password: '******' ).
Apparently this doesn't work either. When I execute it it shows correct info in Monticello Browser, but once I actually push to the repo it asks for credentials again⦠so I guess more digging is required.
This is weird, I use it in a script and it works for me. -- Cyril Ferlicot http://www.synectique.eu 165 Avenue Bretagne Lille 59000 France
I don't know exactly how this is implemented or how it was designed; but I often felt as if you can easily have multiple copies of the same repository spec, where different packages use different ones; setting the credentials for one sometimes makes no difference for another user ...
On 08 Mar 2016, at 10:24, Cyril Ferlicot D. <cyril.ferlicot@gmail.com> wrote:
Le 07/03/2016 18:21, Peter Uhnák a écrit :
MCRepositoryGroup default removeRepository: (MCSmalltalkhubRepository owner: 'Pharo' project: 'Pharo50Inbox'). MCRepositoryGroup default addRepository: (MCSmalltalkhubRepository owner: 'Pharo' project: 'Pharo50Inbox' user: 'peteruhnak' password: '******' ).
Apparently this doesn't work either. When I execute it it shows correct info in Monticello Browser, but once I actually push to the repo it asks for credentials again⦠so I guess more digging is required.
This is weird,
I use it in a script and it works for me.
-- Cyril Ferlicot
165 Avenue Bretagne Lille 59000 France
2016-03-08 10:34 GMT+01:00 Sven Van Caekenberghe <sven@stfx.eu>:
I don't know exactly how this is implemented or how it was designed; but I often felt as if you can easily have multiple copies of the same repository spec, where different packages use different ones; setting the credentials for one sometimes makes no difference for another user ...
Yes. There is code to avoid creating new instances of the same repository, but I'm not sure it ensures unicity of the repository, since, as the scripts show, you may morph one repository into another (or add credentials). Thierry
On 08 Mar 2016, at 10:24, Cyril Ferlicot D. <cyril.ferlicot@gmail.com> wrote:
Le 07/03/2016 18:21, Peter Uhnák a écrit :
MCRepositoryGroup default removeRepository: (MCSmalltalkhubRepository owner: 'Pharo' project: 'Pharo50Inbox'). MCRepositoryGroup default addRepository: (MCSmalltalkhubRepository owner: 'Pharo' project: 'Pharo50Inbox' user: 'peteruhnak' password: '******' ).
Apparently this doesn't work either. When I execute it it shows correct info in Monticello Browser, but once I actually push to the repo it asks for credentials again⦠so I guess more digging is required.
This is weird,
I use it in a script and it works for me.
-- Cyril Ferlicot
165 Avenue Bretagne Lille 59000 France
participants (7)
-
Cyril Ferlicot D. -
Peter Uhnak -
Peter Uhnák -
Sean P. DeNigris -
stepharo -
Sven Van Caekenberghe -
Thierry Goubier