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 signature.asc (836 bytes) Download Attachment |
Administrator
|
In reply to this post by Peter Uhnak
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 |
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-tp4882668p4882713.html > 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 From: [hidden email] Sent: 3/6/2016 9:26 AM To: [hidden email] Subject: Re: [Pharo-users] adding credentials to a repo via a playgroundscript 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-tp4882668p4882713.html > 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 :
|
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. I still need to automate reloading it the config changes though. Peter On Sun, Mar 6, 2016 at 2:34 PM, stepharo <[hidden email]> wrote:
|
Administrator
|
In reply to this post by stepharo
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 |
MCRepositoryGroup default removeRepository: 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 <[hidden email]> wrote: Metacello new |
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. > I use it in a script and it works for me. -- Cyril Ferlicot http://www.synectique.eu 165 Avenue Bretagne Lille 59000 France signature.asc (836 bytes) Download Attachment |
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. <[hidden email]> 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 > > http://www.synectique.eu > > 165 Avenue Bretagne > Lille 59000 France |
2016-03-08 10:34 GMT+01:00 Sven Van Caekenberghe <[hidden email]>: 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
|
Free forum by Nabble | Edit this page |