Twine is a popular tool for uploading Python to repositories. For information on setting your username and password using the configuration file or environment variables, see the official Twine package documentation.
Package Security Manager supports user authentication using Basic Authentication. For information on setting your index URL using the configuration file or environment variables, see the official pip documentation.
Uploading
Installing
To upload your Python packages using Twine, run the following command:
# Replace <FQDN> with your Package Security Manager fully qualified domain name# Replace <CHANNEL> with the name of the channel you want to upload your package to# Replace <PACKAGE> with the name of the package you are uploading# Replace <TOKEN> with a resource token that provides access to the channeltwine upload --repository-url http://<FQDN>/api/repo/<CHANNEL> <PACKAGE> -u <TOKEN> -p x-auth-token
If you are receiving a 401 error message, your token is incorrect.
To install a pip package, run the following command:
# Replace <FQDN> with your Package Security Manager fully qualified domain name# Replace <CHANNEL> with the name of the channel that contains your package# Replace <PACKAGE> with the name of the package you are installing# Replace <TOKEN> with a resource token that provides access to the channelpip install --trusted-host <FQDN> --index-url http://<TOKEN>:x-auth-token@<FQDN>/api/repo/<CHANNEL>/simple <PACKAGE>
Example
pip install --trusted-host demo-repo.com --index-url http://46e98d3dbf2378bb26e2107867652ee734eb098ea5b96f35:[[email protected]](/cdn-cgi/l/email-protection)/api/repo/alex-pip/simple six
There is no standard tool for uploading R packages. Upload your R packages using either the UI or API directly.
Uploading
Installing
To upload R packages, run the following command:
# Replace <FQDN> with your Package Security Manager fully qualified domain name# Replace <CHANNEL> with the name of the channel you want to upload your package to# Replace <PACKAGE> with the name of the package you are uploading# Replace <TOKEN> with a resource token that provides access to the channelcurl -v -F filetype=cran_source_package -F content=@<PACKAGE> http://<FQDN>/api/repo/<CHANNEL> -H"X-Auth: <TOKEN>"
Use cran_source_package for source packages and cran_binary_package for binary R packages.
You can use your domain as a URL in the install.packages function by injecting a token into the path.To install an R package, run the following command:
# Replace <FQDN> with your Package Security Manager fully qualified domain name# Replace <CHANNEL> with the name of the channel that contains your package# Replace <PACKAGE> with the name of the package you are installing# Replace <TOKEN> with a resource token that provides access to the channelinstall.packages("<PACKAGE>", repos="http://<FQDN>/api/repo/t/<TOKEN>/<CHANNEL>/cran")