I have uploaded packages to pub.dartlang.org under two different accounts (one of them work-related, the other personal).
The pub command line tool doesn't have any option to select with which account to publish, so once I log on with the tool, and try to upload a package that belongs to the other account, I see:
$ pub publish
UnauthorizedAccess: Unauthorized user: ___#example.com is not allowed to upload versions to package xyz..
How do I publish with a specific account? Failing that, how do I log out the pub tool in order to log on again under a different account?
There is currently no way in the command line pub tool to upload under different credentials (although there is a proposal).
If you have a fairly recent version of pub, you can log out with:
$ pub logout
Then try pub publish again. The tool will ask you for new credentials.
Could not find a command named "logout".
The pub logout command is an addition from January 2019. If pub tells you this command doesn't exist, you'll have to manually remove the credentials file.
$ rm ~/.pub-cache/credentials.json
If you want to temporarily publish with different credentials you can use a command like:
PUB_CACHE=~/.other_credentials_cache pub publish
This will create a entirely separate "profile" which is used whenever running any pub command with the PUB_CACHE environment variable pointing to a directory other than ~/.pub_cache. If you were to pub get with this cache you'd get entirely separate package downloaded.
With this approach you can toggle between credentials by specifying or not specifying the different cache directory. You'll need to authenticate the first time you use the new directory.
Related
My end goal: I want to fetch data from a retail site on an hourly schedule to see if a specific product is back in stock or not.
I tried using xpath in python to scrape the site myself, but I'm not too familiar, and why reinvent the wheel if someone built a scraper already? In this case, Diggernaut has a github repo.
https://github.com/Diggernaut/configs/tree/master/bananarepublic.gap.com
I'm using the above github repo to try and run a pre-existing web scraper on the banana republic retail site. All that's included in the folder is a config.yml file. I don't even know where to start to try and run it... I am not familiar with using .yml files at all, barely know my way around a terminal (I can do basic "ls" and "cd" and "brew install", otherwise, no idea).
Help! I have docker and git installed (not that I know how to use docker). I have a Mac version 10.13.6 (High Sierra).
I'm not sure why you're looking at using Docker for this, as the config.yml is designed for use on Diggernaut.com and not as part of a docker container deployment. In fact, there is no docker container for Diggernaut that exists as far as I can see.
On the main Github config page for Diggernaut they list the following instructions:
All configs can be used with Diggernaut service to retrieve products information.
You need to create free account at Diggernaut
Login to your account
Create a project with any name and description you want
Get into your new project by clicking it and create new digger with any name
Then you will see 3 options suggested to you, you need to use one where you will use meta-language
Config editor will open and you can simply copy and paste config code and click on save button.
Switch mode for digger from Debug to Active and then run your digger.
Wait for completion.
Download data.
Schedule your runs if required.
I created package and uploaded via an account. i.e. uploader#outlook.com. I did not want to upload via this email address so I did:
pub uploader add new_uploader#outlook.com
Then I did
pub uploader remove uploader#outlook.com
The package displays correctly new_uploader#outlook.com now but I cannot figure out when I need to do a publish to use the new_uploader#outlook.com account. When I try:
flutter packages pub publish
It gives me this error:
UnauthorizedAccess: Unauthorized user: uploader#outlook.com is not allowed to upload versions to package flutter_platform_widgets.
pub finished with exit code 1
How do I tell flutter cli or the pub cli to use new_uploader#outlook.com and not uploader#outlook.com.
Both are google authorised accounts.
Also trying to do:
pub uploader add uploader#outlook.com
Gives an Unauthorized error.
Note: email addresses are not real, just for the purpose of the post
I did find the following as suggested by https://github.com/dart-lang/sdk/issues/14055
Delete the credential file:
.pub_cache/credentials.json
After doing this it asked for reauthentication which I used the new email address. I successfully uploaded the package with that email address.
Problem solved for me
I would like to use the google spreadsheet connector at https://github.com/wso2/esb-connectors/tree/048e223c037b447c3f77c2b7e72338dc26ea5c46/googlespreadsheet. But it is not found in wso2 store. I would like to know how I can compile it and use the connector from github. Please help
Generally git wont allow you to get a folder. so you need to go with svn approach. follow bellow instruction as it is. (assumtion on you are woking in linux / mac enviorment. if not make the command the way works on windows.
create new directory where ever you want and navigate inside that
wget https://raw.githubusercontent.com/wso2/esb-connectors/048e223c037b447c3f77c2b7e72338dc26ea5c46/pom.xml
mkdir wso2
cd wso2
mkdir esbconnector
cd esbconnector/
mkdir googlespreadhseet
cd googlespreadhseet/
svn checkout https://github.com/wso2/esb-connectors/trunk/googlespreadsheet/googlespreadsheet-connector/googlespreadsheet-connector-2.0.0/org.wso2.carbon.connector
cd org.wso2.carbon.connector/
mvn clean install
it may take little time as its required to download few artifacts. if its ended up with error that integration test not found get the integration test Base from the same repo and build that first. then rebuild the connector
Recently Google spreadsheet Version2 connector has been created with REST API and added to WSO2 store. The Connector zip file can be downloaded from here. Go to the link and click the 'download connector' button and follow the documentation for the configuration.
You can checkout the connector source from the https://github.com/wso2/esb-connectors/blob/master/googlespreadsheet and built it.
Then add the connector to the ESB from the UI according to the https://docs.wso2.com/display/ESB481/Managing+Connectors+in+Your+ESB+Instance
I've been trying to setup OSX server to use Xcode CI. My project uses cocoapods and a private repo. I've been following this tutorial: http://papaanton.com/setting-up-xcode-6-and-apple-server-4-0-for-continues-integration-with-cocoapods/
But when I login as the _xcsbuildd user and run the command to add the private repo I get the following error message
fatal: could not create work tree dir '<repo name>': permission denied
I don't have much experience with users and command line tools. I've seen many comments online saying people need to change permissions to get it to work. But I have no idea what I need to change and where.
Can anyone tell me where / what / how I need to modify to give this user access to complete this process.
Just found the answer. Had no idea where cocoapods was storing these repos. I opened finder. Cmd + shift + g
typed in ~/.cocoapods/repos
right click on the repos folder and give "everyone" read & write access to the folder. All good now, CI working completely
I've recently started using a new development machine and when I try to upload my pub package it fails saying "You aren't an uploader for package '\name\'." I've had a look on the pub site but haven't found away for me to find out A) who it thinks I am and B) how to give my current user access.
What is the package name?
You can take a look at the command pub uploader to modify your local uploader settings.