Hi all,
-- I have the code of an app in a FTP repo which has username/password. I am doing a ConfigurationOfMyApp now and I would need to define in the baseline something like
spec repository: 'ftp.mydomainapp.com ...etc'. I know I have a similar method for also specifying the username/pass. But I don't want that because it means storing the username/pass in the ConfigurationOf code.
So....how can I manage this with metacello? the only thing I found (which I am not sure if it works) is to use repositoryOverride so when I am about to load my project I do a #repositoryOverride: passing as argument a FTP with my username/password.
What do you think? best, You received this message because you are subscribed to the Google Groups "Metacello" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/groups/opt_out. |
Mariano,
I would think that you'd treat the FTP repository like the HTTP repository, i.e., if you add the repository in the MetacelloBrowser and set the username/password there, then Metacello should honor that (like it does for the HTTP repository) ... so instead of adding some sort of repository override to the load script, simply create the FTP repository with username/password inline in your load script. Dale ----- Original Message ----- | From: "Mariano Martinez Peck" <[hidden email]> | To: [hidden email], "Pharo Development" <[hidden email]> | Sent: Monday, April 15, 2013 11:11:09 AM | Subject: [Metacello] FTP repo without storing username/pass in ConfigurationOf | | Hi all, | | I have the code of an app in a FTP repo which has username/password. | I am doing a ConfigurationOfMyApp now and I would need to define in the | baseline something like | | spec repository: 'ftp.mydomainapp.com ...etc'. | | I know I have a similar method for also specifying the username/pass. But I | don't want that because it means storing the username/pass in the | ConfigurationOf code. | | So....how can I manage this with metacello? the only thing I found (which I | am not sure if it works) is to use repositoryOverride so when I am about to | load my project I do a #repositoryOverride: passing as argument a FTP with | my username/password. | | What do you think? | | best, | | -- | Mariano | http://marianopeck.wordpress.com | | -- | You received this message because you are subscribed to the Google Groups | "Metacello" group. | To unsubscribe from this group and stop receiving emails from it, send an | email to [hidden email]. | For more options, visit https://groups.google.com/groups/opt_out. | | | -- You received this message because you are subscribed to the Google Groups "Metacello" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/groups/opt_out. |
On Mon, Apr 15, 2013 at 9:07 PM, Dale Henrichs <[hidden email]> wrote: Mariano, Dale, do you mean MonticelloBrowser rather than MetacelloBrowser? In either case, I was not using any of them....I was thinking of how to load my app with metacello using a Gofer script.
and set the username/password there, then Metacello should honor that (like it does for the HTTP repository) ... so instead of adding some sort of repository override to the load script, simply create the FTP repository with username/password inline in your load script. Do you mean that I should declare my FTP repository like: MCFtpRepository host: 'ftp.xxx.com'
directory: 'mc' user: aUsername password: aPassword
and somehow register that repo in Monticello ? so then when I load a ConfiguratioOfMyApp that has that repo it will honor the already set up username/password?
Thanks!
Mariano http://marianopeck.wordpress.com You received this message because you are subscribed to the Google Groups "Metacello" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/groups/opt_out. |
----- Original Message ----- | From: "Mariano Martinez Peck" <[hidden email]> | To: [hidden email] | Sent: Monday, April 15, 2013 6:02:03 PM | Subject: Re: [Metacello] FTP repo without storing username/pass in ConfigurationOf | | On Mon, Apr 15, 2013 at 9:07 PM, Dale Henrichs <[hidden email]> wrote: | | > Mariano, | > | > I would think that you'd treat the FTP repository like the HTTP | > repository, i.e., if you add the repository in the MetacelloBrowser | | | Dale, do you mean MonticelloBrowser rather than MetacelloBrowser? In either | case, I was not using any of them....I was thinking of how to load my app | with metacello using a Gofer script. Whoops yes, I meant MonticelloBrowser:) | | | > and set the username/password there, then Metacello should honor that | > (like it does for the HTTP repository) ... so instead of adding some sort | > of repository override to the load script, simply create the FTP repository | > with username/password inline in your load script. | > | | | Do you mean that I should declare my FTP repository like: | | MCFtpRepository | host: 'ftp.xxx.com' | directory: 'mc' | user: aUsername | password: aPassword | | and somehow register that repo in Monticello ? so then when I load a | ConfiguratioOfMyApp that has that repo it will honor the already set up | username/password? Yes. Metacello will use existing http/ftp/etc. repositories thus inheriting the username and passwords set in the image. So if you create the ftp repository ahead of time (and specify a username and password) everything should work smoothly (barring any bugs in Metacello:) .. I think it is a good idea to try to keep Metacello out of the username/password business as much as possible:) Dale -- You received this message because you are subscribed to the Google Groups "Metacello" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/groups/opt_out. |
On Mon, Apr 15, 2013 at 10:14 PM, Dale Henrichs <[hidden email]> wrote:
Hi Dale, I tried that but it still didn't work. I get the following error: [:response | (TelnetProtocolError protocolInstance: self)
signal: response] in FTPClient(TelnetProtocolClient)>>lookForCode: Receiver: a FTPClient Arguments and temporary variables:
code: 331 response: '530 This is a private system - No anonymous login'
In the baseline I have something like spec repository: 'ftp://ftp.mydomain.com/myDirectory'.
and before loading with metacello I do: repository := MCFtpRepository host: 'ftp.mydomain.com'
directory: 'myDirectory' user: 'whatever'
password: 'whatelse'. MCRepositoryGroup default addRepository: repository. And in fact, if I open MonticelloBrowser I do see my FTP repo with its correct username/pass...I can browse packages etc... So maybe I am not registering the package in the exact same collection Metacello is looking for? where does it look for the repo?
how does it "honor" the already set up username/pass? Thanks! Dale Mariano http://marianopeck.wordpress.com You received this message because you are subscribed to the Google Groups "Metacello" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/groups/opt_out. |
Mariano,
This sounds like a Metacello bug ... I know that the same trick works for HTTP repositories ... what version of Pharo are you using ... I'll have to track this one down ... Dale ----- Original Message ----- | From: "Mariano Martinez Peck" <[hidden email]> | To: [hidden email] | Sent: Tuesday, April 16, 2013 7:55:50 AM | Subject: Re: [Metacello] FTP repo without storing username/pass in ConfigurationOf | | On Mon, Apr 15, 2013 at 10:14 PM, Dale Henrichs <[hidden email]> wrote: | | > | > | > | | > | | > | > and set the username/password there, then Metacello should honor that | > | > (like it does for the HTTP repository) ... so instead of adding some | > sort | > | > of repository override to the load script, simply create the FTP | > repository | > | > with username/password inline in your load script. | > | > | > | | > | | > | Do you mean that I should declare my FTP repository like: | > | | > | MCFtpRepository | > | host: 'ftp.xxx.com' | > | directory: 'mc' | > | user: aUsername | > | password: aPassword | > | | > | and somehow register that repo in Monticello ? so then when I load a | > | ConfiguratioOfMyApp that has that repo it will honor the already set up | > | username/password? | > | > Yes. Metacello will use existing http/ftp/etc. repositories thus | > inheriting the username and passwords set in the image. So if you create | > the ftp repository ahead of time (and specify a username and password) | > everything should work smoothly (barring any bugs in Metacello:) .. | > | > I think it is a good idea to try to keep Metacello out of the | > username/password business as much as possible:) | > | > | Hi Dale, I tried that but it still didn't work. I get the following error: | | [:response | (TelnetProtocolError protocolInstance: self) | signal: response] in FTPClient(TelnetProtocolClient)>>lookForCode: | Receiver: a FTPClient | Arguments and temporary variables: | code: 331 | response: '530 This is a private system - No anonymous login' | | | In the baseline I have something like | | spec repository: 'ftp://ftp.mydomain.com/myDirectory'. | | | and before loading with metacello I do: | | | repository := MCFtpRepository | host: 'ftp.mydomain.com' | directory: 'myDirectory' | user: 'whatever' | password: 'whatelse'. | | MCRepositoryGroup default addRepository: repository. | | And in fact, if I open MonticelloBrowser I do see my FTP repo with its | correct username/pass...I can browse packages etc... | | So maybe I am not registering the package in the exact same collection | Metacello is looking for? where does it look for the repo? | how does it "honor" the already set up username/pass? | | Thanks! | | | | | > Dale | > | > -- | > You received this message because you are subscribed to the Google Groups | > "Metacello" group. | > To unsubscribe from this group and stop receiving emails from it, send an | > email to [hidden email]. | > For more options, visit https://groups.google.com/groups/opt_out. | > | > | > | | | -- | Mariano | http://marianopeck.wordpress.com | | -- | You received this message because you are subscribed to the Google Groups | "Metacello" group. | To unsubscribe from this group and stop receiving emails from it, send an | email to [hidden email]. | For more options, visit https://groups.google.com/groups/opt_out. | | | -- You received this message because you are subscribed to the Google Groups "Metacello" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/groups/opt_out. |
In reply to this post by Mariano Martinez Peck
Mariano,
After closer inspection it turns out that for FTP repositories, you must specify the username to uniquely identify the FTP url. If you specify the username and leave the password empty in your Metacello spec, things should work correctly ... Here are the gory details. There is code in Metacello that looks like the following: description := aSpec description. (repo := repositories detect: [:rep | rep description = description ] ifNone: [ aSpec createRepository ]) ~~ nil ifTrue: [ repos add: repo ] where Metacello is attempting to determine if the repository has already been created in the image. If the repository exists, then the in-image credentials are used and you don't have to include user and password in the Metacello repository spec. BTW, if you look at MCRepository>>= Metacello is basically using the same algorithm. Now if you look at how MCHttpRepository behaves: (MCHttpRepository location: 'http://example.com' user: 'foo' password: 'bar') description. prints as: 'http://example.com' Notice that the user is excluded from the description. Whereas for MCFtpRepository behaves differently: (MCFtpRepository host: 'ftp.mydomain.com' directory: 'myDirectory' user: 'whatever' password: 'whatelse') description. prints as: 'ftp://[hidden email]/myDirectory', Notice that the `user` is included in the description... So if you want an FTP repository to be considered #= to another FTP repository you must specify the user name ... Let me know if this works for you. Dale ----- Original Message ----- | From: "Mariano Martinez Peck" <[hidden email]> | To: [hidden email] | Sent: Tuesday, April 16, 2013 7:55:50 AM | Subject: Re: [Metacello] FTP repo without storing username/pass in ConfigurationOf | | On Mon, Apr 15, 2013 at 10:14 PM, Dale Henrichs <[hidden email]> wrote: | | > | > | > | | > | | > | > and set the username/password there, then Metacello should honor that | > | > (like it does for the HTTP repository) ... so instead of adding some | > sort | > | > of repository override to the load script, simply create the FTP | > repository | > | > with username/password inline in your load script. | > | > | > | | > | | > | Do you mean that I should declare my FTP repository like: | > | | > | MCFtpRepository | > | host: 'ftp.xxx.com' | > | directory: 'mc' | > | user: aUsername | > | password: aPassword | > | | > | and somehow register that repo in Monticello ? so then when I load a | > | ConfiguratioOfMyApp that has that repo it will honor the already set up | > | username/password? | > | > Yes. Metacello will use existing http/ftp/etc. repositories thus | > inheriting the username and passwords set in the image. So if you create | > the ftp repository ahead of time (and specify a username and password) | > everything should work smoothly (barring any bugs in Metacello:) .. | > | > I think it is a good idea to try to keep Metacello out of the | > username/password business as much as possible:) | > | > | Hi Dale, I tried that but it still didn't work. I get the following error: | | [:response | (TelnetProtocolError protocolInstance: self) | signal: response] in FTPClient(TelnetProtocolClient)>>lookForCode: | Receiver: a FTPClient | Arguments and temporary variables: | code: 331 | response: '530 This is a private system - No anonymous login' | | | In the baseline I have something like | | spec repository: 'ftp://ftp.mydomain.com/myDirectory'. | | | and before loading with metacello I do: | | | repository := MCFtpRepository | host: 'ftp.mydomain.com' | directory: 'myDirectory' | user: 'whatever' | password: 'whatelse'. | | MCRepositoryGroup default addRepository: repository. | | And in fact, if I open MonticelloBrowser I do see my FTP repo with its | correct username/pass...I can browse packages etc... | | So maybe I am not registering the package in the exact same collection | Metacello is looking for? where does it look for the repo? | how does it "honor" the already set up username/pass? | | Thanks! | | | | | > Dale | > | > -- | > You received this message because you are subscribed to the Google Groups | > "Metacello" group. | > To unsubscribe from this group and stop receiving emails from it, send an | > email to [hidden email]. | > For more options, visit https://groups.google.com/groups/opt_out. | > | > | > | | | -- | Mariano | http://marianopeck.wordpress.com | | -- | You received this message because you are subscribed to the Google Groups | "Metacello" group. | To unsubscribe from this group and stop receiving emails from it, send an | email to [hidden email]. | For more options, visit https://groups.google.com/groups/opt_out. | | | -- You received this message because you are subscribed to the Google Groups "Metacello" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/groups/opt_out. |
On Tue, Apr 16, 2013 at 3:47 PM, Dale Henrichs <[hidden email]> wrote: Mariano, Hi Dale, Thanks for the gory details, I understood :) Now I wonder...imagine I don't want to even include the username in the ConfigurationOf.... shouldn't the repository override trick work?
Something along the lines of: | repository | repository := MCFtpRepository host: 'ftp.mydomain.com'
directory: 'myDirectory' user: 'whatever'
password: 'whatelse'. version := (ConfigurationOfXX project version: 'xxx').
version repositoryOverrides: Array with: repository. version load. just to be sure...#repositoryOverrides: does not propagate to transitive dependencies right?
Thanks in advance, Here are the gory details. Mariano http://marianopeck.wordpress.com You received this message because you are subscribed to the Google Groups "Metacello" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/groups/opt_out. |
Mariano,
repositorOverrides: does apply to the entire load sequence, so it's not the best option for trying to simply keep your credentials private ... The http repository does not expose user names and works just fine picking up the image based instance with credentials defined so I would expect the ftp repository to behave similarly. If you want to keep the ftp user private the long term answer is submit a bug against the ftp repository implementation and ask that ftp repositories behave the same as http repositories with respect to credentials. Like I said before, I don't think that Metacello should be in the business of managing credentials and that includes adding features to Metacello whose sole purpose is to make up for a deficiencies elsewhere in the system ... For the short term, you might just change the definition of MCFtpRepository>>description from: description ^ 'ftp://', user, '@', host, '/', directory to: description ^ 'ftp://', host, '/', directory and your username can be kept private ... I doesn't appear that description is used for anything other than display and comparison purposes ... Dale ----- Original Message ----- | From: "Mariano Martinez Peck" <[hidden email]> | To: [hidden email] | Sent: Tuesday, April 16, 2013 12:35:18 PM | Subject: Re: [Metacello] FTP repo without storing username/pass in ConfigurationOf | | On Tue, Apr 16, 2013 at 3:47 PM, Dale Henrichs <[hidden email]> wrote: | | > Mariano, | > | > After closer inspection it turns out that for FTP repositories, you must | > specify the username to uniquely identify the FTP url. If you specify the | > username and leave the password empty in your Metacello spec, things should | > work correctly ... | > | > | Hi Dale, | | Thanks for the gory details, I understood :) | Now I wonder...imagine I don't want to even include the username in the | ConfigurationOf.... shouldn't the repository override trick work? | Something along the lines of: | | | repository | | repository := MCFtpRepository | host: 'ftp.mydomain.com' | directory: 'myDirectory' | user: 'whatever' | password: 'whatelse'. | version := (ConfigurationOfXX project version: 'xxx'). | version | repositoryOverrides: Array with: repository. | version load. | | just to be sure...#repositoryOverrides: does not propagate to transitive | dependencies right? | | Thanks in advance, | | | | | | > Here are the gory details. | > | > There is code in Metacello that looks like the following: | > | > description := aSpec description. | > (repo := repositories | > detect: [:rep | rep description = description ] | > ifNone: [ aSpec createRepository ]) ~~ nil | > ifTrue: [ repos add: repo ] | > | > where Metacello is attempting to determine if the repository has already | > been created in the image. If the repository exists, then the in-image | > credentials are used and you don't have to include user and password in the | > Metacello repository spec. | > | > BTW, if you look at MCRepository>>= Metacello is basically using the same | > algorithm. | > | > Now if you look at how MCHttpRepository behaves: | > | > (MCHttpRepository | > location: 'http://example.com' | > user: 'foo' | > password: 'bar') description. | > | > prints as: | > | > 'http://example.com' | > | > Notice that the user is excluded from the description. | > | > Whereas for MCFtpRepository behaves differently: | > | > (MCFtpRepository | > host: 'ftp.mydomain.com' | > directory: 'myDirectory' | > user: 'whatever' | > password: 'whatelse') description. | > | > prints as: | > | > 'ftp://[hidden email]/myDirectory', | > | > Notice that the `user` is included in the description... | > | > So if you want an FTP repository to be considered #= to another FTP | > repository you must specify the user name ... | > | > Let me know if this works for you. | > | > Dale | > | > ----- Original Message ----- | > | From: "Mariano Martinez Peck" <[hidden email]> | > | To: [hidden email] | > | Sent: Tuesday, April 16, 2013 7:55:50 AM | > | Subject: Re: [Metacello] FTP repo without storing username/pass in | > ConfigurationOf | > | | > | On Mon, Apr 15, 2013 at 10:14 PM, Dale Henrichs <[hidden email]> | > wrote: | > | | > | > | > | > | > | > | | > | > | | > | > | > and set the username/password there, then Metacello should honor | > that | > | > | > (like it does for the HTTP repository) ... so instead of adding | > some | > | > sort | > | > | > of repository override to the load script, simply create the FTP | > | > repository | > | > | > with username/password inline in your load script. | > | > | > | > | > | | > | > | | > | > | Do you mean that I should declare my FTP repository like: | > | > | | > | > | MCFtpRepository | > | > | host: 'ftp.xxx.com' | > | > | directory: 'mc' | > | > | user: aUsername | > | > | password: aPassword | > | > | | > | > | and somehow register that repo in Monticello ? so then when I load a | > | > | ConfiguratioOfMyApp that has that repo it will honor the already set | > up | > | > | username/password? | > | > | > | > Yes. Metacello will use existing http/ftp/etc. repositories thus | > | > inheriting the username and passwords set in the image. So if you | > create | > | > the ftp repository ahead of time (and specify a username and password) | > | > everything should work smoothly (barring any bugs in Metacello:) .. | > | > | > | > I think it is a good idea to try to keep Metacello out of the | > | > username/password business as much as possible:) | > | > | > | > | > | Hi Dale, I tried that but it still didn't work. I get the following | > error: | > | | > | [:response | (TelnetProtocolError protocolInstance: self) | > | signal: response] in FTPClient(TelnetProtocolClient)>>lookForCode: | > | Receiver: a FTPClient | > | Arguments and temporary variables: | > | code: 331 | > | response: '530 This is a private system - No anonymous login' | > | | > | | > | In the baseline I have something like | > | | > | spec repository: 'ftp://ftp.mydomain.com/myDirectory'. | > | | > | | > | and before loading with metacello I do: | > | | > | | > | repository := MCFtpRepository | > | host: 'ftp.mydomain.com' | > | directory: 'myDirectory' | > | user: 'whatever' | > | password: 'whatelse'. | > | | > | MCRepositoryGroup default addRepository: repository. | > | | > | And in fact, if I open MonticelloBrowser I do see my FTP repo with its | > | correct username/pass...I can browse packages etc... | > | | > | So maybe I am not registering the package in the exact same collection | > | Metacello is looking for? where does it look for the repo? | > | how does it "honor" the already set up username/pass? | > | | > | Thanks! | > | | > | | > | | > | | > | > Dale | > | > | > | > -- | > | > You received this message because you are subscribed to the Google | > Groups | > | > "Metacello" group. | > | > To unsubscribe from this group and stop receiving emails from it, send | > an | > | > email to [hidden email]. | > | > For more options, visit https://groups.google.com/groups/opt_out. | > | > | > | > | > | > | > | | > | | > | -- | > | Mariano | > | http://marianopeck.wordpress.com | > | | > | -- | > | You received this message because you are subscribed to the Google Groups | > | "Metacello" group. | > | To unsubscribe from this group and stop receiving emails from it, send an | > | email to [hidden email]. | > | For more options, visit https://groups.google.com/groups/opt_out. | > | | > | | > | | > | > -- | > You received this message because you are subscribed to the Google Groups | > "Metacello" group. | > To unsubscribe from this group and stop receiving emails from it, send an | > email to [hidden email]. | > For more options, visit https://groups.google.com/groups/opt_out. | > | > | > | | | -- | Mariano | http://marianopeck.wordpress.com | | -- | You received this message because you are subscribed to the Google Groups | "Metacello" group. | To unsubscribe from this group and stop receiving emails from it, send an | email to [hidden email]. | For more options, visit https://groups.google.com/groups/opt_out. | | | -- You received this message because you are subscribed to the Google Groups "Metacello" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/groups/opt_out. |
Dale Henrichs wrote:
> Mariano, > > repositorOverrides: does apply to the entire load sequence, so it's not the best option for trying to simply keep your credentials private ... > > The http repository does not expose user names and works just fine picking up the image based instance with credentials defined so I would expect the ftp repository to behave similarly. > > If you want to keep the ftp user private the long term answer is submit a bug against the ftp repository implementation and ask that ftp repositories behave the same as http repositories with respect to credentials. > +1 Principal Of Least Surprise. > Like I said before, I don't think that Metacello should be in the business of managing credentials and that includes adding features to Metacello whose sole purpose is to make up for a deficiencies elsewhere in the system ... > > For the short term, you might just change the definition of MCFtpRepository>>description from: > > description > ^ 'ftp://', user, '@', host, '/', directory > > to: > > description > ^ 'ftp://', host, '/', directory > > and your username can be kept private ... I doesn't appear that description is used for anything other than display and comparison purposes ... > > Dale > > ----- Original Message ----- > | From: "Mariano Martinez Peck" <[hidden email]> > | To: [hidden email] > | Sent: Tuesday, April 16, 2013 12:35:18 PM > | Subject: Re: [Metacello] FTP repo without storing username/pass in ConfigurationOf > | > | On Tue, Apr 16, 2013 at 3:47 PM, Dale Henrichs <[hidden email]> wrote: > | > | > Mariano, > | > > | > After closer inspection it turns out that for FTP repositories, you must > | > specify the username to uniquely identify the FTP url. If you specify the > | > username and leave the password empty in your Metacello spec, things should > | > work correctly ... > | > > | > > | Hi Dale, > | > | Thanks for the gory details, I understood :) > | Now I wonder...imagine I don't want to even include the username in the > | ConfigurationOf.... shouldn't the repository override trick work? > | Something along the lines of: > | > | | repository | > | repository := MCFtpRepository > | host: 'ftp.mydomain.com' > | directory: 'myDirectory' > | user: 'whatever' > | password: 'whatelse'. > | version := (ConfigurationOfXX project version: 'xxx'). > | version > | repositoryOverrides: Array with: repository. > | version load. > | > | just to be sure...#repositoryOverrides: does not propagate to transitive > | dependencies right? > | > | Thanks in advance, > | > | > | > | > | > | > Here are the gory details. > | > > | > There is code in Metacello that looks like the following: > | > > | > description := aSpec description. > | > (repo := repositories > | > detect: [:rep | rep description = description ] > | > ifNone: [ aSpec createRepository ]) ~~ nil > | > ifTrue: [ repos add: repo ] > | > > | > where Metacello is attempting to determine if the repository has already > | > been created in the image. If the repository exists, then the in-image > | > credentials are used and you don't have to include user and password in the > | > Metacello repository spec. > | > > | > BTW, if you look at MCRepository>>= Metacello is basically using the same > | > algorithm. > | > > | > Now if you look at how MCHttpRepository behaves: > | > > | > (MCHttpRepository > | > location: 'http://example.com' > | > user: 'foo' > | > password: 'bar') description. > | > > | > prints as: > | > > | > 'http://example.com' > | > > | > Notice that the user is excluded from the description. > | > > | > Whereas for MCFtpRepository behaves differently: > | > > | > (MCFtpRepository > | > host: 'ftp.mydomain.com' > | > directory: 'myDirectory' > | > user: 'whatever' > | > password: 'whatelse') description. > | > > | > prints as: > | > > | > 'ftp://[hidden email]/myDirectory', > | > > | > Notice that the `user` is included in the description... > | > > | > So if you want an FTP repository to be considered #= to another FTP > | > repository you must specify the user name ... > | > > | > Let me know if this works for you. > | > > | > Dale > | > > | > ----- Original Message ----- > | > | From: "Mariano Martinez Peck" <[hidden email]> > | > | To: [hidden email] > | > | Sent: Tuesday, April 16, 2013 7:55:50 AM > | > | Subject: Re: [Metacello] FTP repo without storing username/pass in > | > ConfigurationOf > | > | > | > | On Mon, Apr 15, 2013 at 10:14 PM, Dale Henrichs <[hidden email]> > | > wrote: > | > | > | > | > > | > | > > | > | > | > | > | > | > | > | > | > and set the username/password there, then Metacello should honor > | > that > | > | > | > (like it does for the HTTP repository) ... so instead of adding > | > some > | > | > sort > | > | > | > of repository override to the load script, simply create the FTP > | > | > repository > | > | > | > with username/password inline in your load script. > | > | > | > > | > | > | > | > | > | > | > | > | Do you mean that I should declare my FTP repository like: > | > | > | > | > | > | MCFtpRepository > | > | > | host: 'ftp.xxx.com' > | > | > | directory: 'mc' > | > | > | user: aUsername > | > | > | password: aPassword > | > | > | > | > | > | and somehow register that repo in Monticello ? so then when I load a > | > | > | ConfiguratioOfMyApp that has that repo it will honor the already set > | > up > | > | > | username/password? > | > | > > | > | > Yes. Metacello will use existing http/ftp/etc. repositories thus > | > | > inheriting the username and passwords set in the image. So if you > | > create > | > | > the ftp repository ahead of time (and specify a username and password) > | > | > everything should work smoothly (barring any bugs in Metacello:) .. > | > | > > | > | > I think it is a good idea to try to keep Metacello out of the > | > | > username/password business as much as possible:) > | > | > > | > | > > | > | Hi Dale, I tried that but it still didn't work. I get the following > | > error: > | > | > | > | [:response | (TelnetProtocolError protocolInstance: self) > | > | signal: response] in FTPClient(TelnetProtocolClient)>>lookForCode: > | > | Receiver: a FTPClient > | > | Arguments and temporary variables: > | > | code: 331 > | > | response: '530 This is a private system - No anonymous login' > | > | > | > | > | > | In the baseline I have something like > | > | > | > | spec repository: 'ftp://ftp.mydomain.com/myDirectory'. > | > | > | > | > | > | and before loading with metacello I do: > | > | > | > | > | > | repository := MCFtpRepository > | > | host: 'ftp.mydomain.com' > | > | directory: 'myDirectory' > | > | user: 'whatever' > | > | password: 'whatelse'. > | > | > | > | MCRepositoryGroup default addRepository: repository. > | > | > | > | And in fact, if I open MonticelloBrowser I do see my FTP repo with its > | > | correct username/pass...I can browse packages etc... > | > | > | > | So maybe I am not registering the package in the exact same collection > | > | Metacello is looking for? where does it look for the repo? > | > | how does it "honor" the already set up username/pass? > | > | > | > | Thanks! > | > | > | > | > | > | > | > | > | > | > Dale > | > | > > | > | > -- > | > | > You received this message because you are subscribed to the Google > | > Groups > | > | > "Metacello" group. > | > | > To unsubscribe from this group and stop receiving emails from it, send > | > an > | > | > email to [hidden email]. > | > | > For more options, visit https://groups.google.com/groups/opt_out. > | > | > > | > | > > | > | > > | > | > | > | > | > | -- > | > | Mariano > | > | http://marianopeck.wordpress.com > | > | > | > | -- > | > | You received this message because you are subscribed to the Google Groups > | > | "Metacello" group. > | > | To unsubscribe from this group and stop receiving emails from it, send an > | > | email to [hidden email]. > | > | For more options, visit https://groups.google.com/groups/opt_out. > | > | > | > | > | > | > | > > | > -- > | > You received this message because you are subscribed to the Google Groups > | > "Metacello" group. > | > To unsubscribe from this group and stop receiving emails from it, send an > | > email to [hidden email]. > | > For more options, visit https://groups.google.com/groups/opt_out. > | > > | > > | > > | > | > | -- > | Mariano > | http://marianopeck.wordpress.com > | > | -- > | You received this message because you are subscribed to the Google Groups > | "Metacello" group. > | To unsubscribe from this group and stop receiving emails from it, send an > | email to [hidden email]. > | For more options, visit https://groups.google.com/groups/opt_out. > | > | > | > > -- You received this message because you are subscribed to the Google Groups "Metacello" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/groups/opt_out. |
In reply to this post by Dale Henrichs
On Tue, Apr 16, 2013 at 6:13 PM, Dale Henrichs <[hidden email]> wrote: Mariano, OK. The http repository does not expose user names and works just fine picking up the image based instance with credentials defined so I would expect the ftp repository to behave similarly.
+9999
+1
Yes, this is a very good idea. I will open an issue in the bug tracker. Anyone has an objection? Cheers,
Mariano http://marianopeck.wordpress.com You received this message because you are subscribed to the Google Groups "Metacello" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/groups/opt_out. |
In reply to this post by Dale Henrichs
Hi Dale, Coming back to this problem. I am now using my own instance of SmalltalkHub running with HTTPS. And I have the same problem... If I previously add the repository in the MonticelloBrowser, then the username/pass is "remembered" and it works.
But I am trying to define a load script without UI. | repository | repository := (MCHttpRepository location: 'https://myownshub/mc/XXX/YYY/main'
user: 'user' password: 'pass'). MCRepositoryGroup default addRepository: repository.
But it seems that is not enough....mmmm what else can MonticelloBrowser do besides that?? mmmm browing MonticelloBrowser now to see if I find the answer.... best, On Tue, Apr 16, 2013 at 3:47 PM, Dale Henrichs <[hidden email]> wrote: Mariano, Mariano http://marianopeck.wordpress.com You received this message because you are subscribed to the Google Groups "Metacello" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/groups/opt_out. |
Mariano,
-- MCRepositoryGroup>>addRepository does a detect to see if the repo is already there and #= uses #description which does not include a #user or #password ... so the #addRepository is a noop if the repository is already defined ... so something like this is probably needed: | repository repo| repository := (MCHttpRepository location: 'https://myownshub/mc/XXX/YYY/main'
user: '' password: ''). repo := MCRepositorygroup default repositories detect: [:each | each description = repository description ] ifNone: [repository].repo user: 'user'; password: 'pass'. Then you can be guaranteed to set the user and password of the correct instance... Dale From: "Mariano Martinez Peck" <[hidden email]> You received this message because you are subscribed to the Google Groups "Metacello" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/groups/opt_out. |
Free forum by Nabble | Edit this page |