MYHOSPITALNOW.COM

Find Trusted Doctors & Hospitals

Discover healthcare providers, compare hospitals, and explore treatment options worldwide.

Free Treatment Quotes • Doctor Search • Hospital Comparison

Find Healthcare Options

www.myhospitalnow.com

How to upload package to Nexus and Artifactory using curl and powershell?

Solution – 1


$URI = New-Object System.Uri("https://artifactory.example.com/artifactory/net-generic-local/APP/BF_2.0.zip")  
$SOURCE = ".\BF_2.0.zip"  
$AF_USER = "user"  
$AF_PWD = ConvertTo-SecureString "password" -AsPlainText -Force  
$CREDS = New-Object System.Management.Automation.PSCredential ($AF_USER, $AF_PWD)  

Invoke-WebRequest -Uri $URI -InFile $SOURCE -Method Put -Credential $CREDS  Code language: PHP (php)

Solution – 2


$SOURCE = ".\BF_2.0.zip"  
$DESTINATION = "https://artifactory.example.com/artifactory/net-generic-local/APP/BF_2.0.zip"  
$AF_USER ="user"  
$AF_PWD ="password"  
$WebClient = New-Object System.Net.WebClient  
$WebClient.Credentials = New-Object System.Net.NetworkCredential($AF_USER, $AF_PWD)  
$URI = New-Object System.Uri($DESTINATION)
$METHOD = "PUT"  
$WebClient.UploadFile($URI, $METHOD, $SOURCE) Code language: PHP (php)

Solution – 3


$credential_bytes = [System.Text.Encoding]::UTF8.GetBytes($username + ":" + $api_token)
$credentials = [System.Convert]::ToBase64String($credential_bytes)
$credential_header = "Basic " + $credentials    
Invoke-WebRequest -Uri $artifactory_dest_url -InFile "my_file.zip" -Method Put -Headers @{"Authorization"="$credential_header"}
Code language: PHP (php)

Solution – 4


$SOURCE = ('D:\RefreshAutomationProd_bkp'ย +ย (get-dateย -Formatย yyyyMMdd)ย +ย '.zip')
echo "SOURCE : $SOURCE"

$DESTINATION = "http://172.26.10.46:8081/repository/RefreshAutomation/"+('RefreshAutomationProd_bkp'ย +ย (get-dateย -Formatย yyyyMMdd)ย +ย '.zip')
echo "DESTINATION : $DESTINATION"  

$AF_USER ="admin"  
$AF_PWD ="Admin@123"  
$WebClient = New-Object System.Net.WebClient  
$WebClient.Credentials = New-Object System.Net.NetworkCredential($AF_USER, $AF_PWD)  
$URI = New-Object System.Uri($DESTINATION)
$METHOD = "PUT"  
$WebClient.UploadFile($URI, $METHOD, $SOURCE)Code language: PHP (php)

Find Trusted Cardiac Hospitals

Compare heart hospitals by city and services โ€” all in one place.

Explore Hospitals
I'm Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked at Cotocus and regularly write about technology, travel, investing, health, product reviews, and digital marketing through my various platforms. I publish technical articles at DevOps School, travel stories at Holiday Landmark, stock market insights at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at TrueReviewNow, and SEO and digital marketing strategies at Wizbrand.

Related Posts

Sonatype Nexus vs. JFrog Artifactory โ€“ In-Depth Comparison

Hereโ€™s a comprehensive comparison of Sonatype Nexus Repository vs. JFrog Artifactory in a tabular format based on the official documentation and feature matrices: ๐Ÿ“Š Sonatype Nexus vs….

Read More

Best and widely used Repository Management Systems (RMS)

1๏ธโƒฃ Multiple Artifacts โ†’ Form a Package 2๏ธโƒฃ Multiple Packages โ†’ Stored in a Repository 3๏ธโƒฃ Repository โ†’ Managed by RMS โœ… In Short: Here are some…

Read More

Repository Management System (RMS) and a Registry

A Repository Management System (RMS) and a Registry are related but not always the same thing: โœ… Repository Management System (RMS): โœ… Registry: ๐Ÿ”น Key Difference: ๐Ÿ’ก…

Read More

Best Tools for Storing Packages in SRE (Site Reliability Engineering)

๐Ÿš€ Best Tools for Storing Packages in SRE (Site Reliability Engineering) Modern SRE teams use artifact repositories and package registries to store, manage, and distribute software packages,…

Read More

Artifact Repository Management tools in 2024

In 2024, Artifact Repository Management (ARM) tools remain crucial for software development, ensuring secure storage, distribution, and management of various artifacts like binaries, libraries, and packages. Here’s…

Read More

List of helm chart private registry software

JFrog Container Registry: A private container registry that supports Helm charts along with container images. It provides features such as access control, versioning, and security scanning. Harbor:…

Read More
Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
0
Would love your thoughts, please comment.x
()
x