mirror of
https://github.com/rgl/nexus-vagrant.git
synced 2026-10-09 05:35:32 +02:00
set the curl request password from stdin
This commit is contained in:
@@ -23,12 +23,15 @@ popd
|
||||
# see https://help.sonatype.com/en/apt-repositories.html
|
||||
apt-get install -y curl
|
||||
curl \
|
||||
--silent \
|
||||
--fail-with-body \
|
||||
--show-error \
|
||||
--user 'alice.doe:password' \
|
||||
--config - \
|
||||
--header 'Content-Type: multipart/form-data' \
|
||||
--data-binary @hello-world_1.0.0_amd64.deb \
|
||||
https://$nexus_domain/repository/apt-hosted/
|
||||
https://$nexus_domain/repository/apt-hosted/ <<'EOF'
|
||||
user = "alice.doe:password"
|
||||
EOF
|
||||
|
||||
# import the apt-hosted key.
|
||||
nexus_apt_hosted_keyring_path="/etc/apt/keyrings/$nexus_domain-apt-hosted.gpg"
|
||||
|
||||
@@ -14,7 +14,15 @@ apt-get install -y curl
|
||||
# see https://help.sonatype.com/display/NXRM3/Raw+Repositories+and+Maven+Sites#RawRepositoriesandMavenSites-UploadingFilestoHostedRawRepositories
|
||||
expected='this is an adhoc package'
|
||||
echo "$expected" >package-1.0.0.txt
|
||||
curl --silent --fail-with-body --show-error --user 'alice.doe:password' --upload-file package-1.0.0.txt https://$nexus_domain/repository/adhoc-package/package-1.0.0.txt
|
||||
curl \
|
||||
--silent \
|
||||
--fail-with-body \
|
||||
--show-error \
|
||||
--config - \
|
||||
--upload-file package-1.0.0.txt \
|
||||
https://$nexus_domain/repository/adhoc-package/package-1.0.0.txt <<'EOF'
|
||||
user = "alice.doe:password"
|
||||
EOF
|
||||
|
||||
# download.
|
||||
actual=$(curl --silent --fail-with-body --show-error https://$nexus_domain/repository/adhoc-package/package-1.0.0.txt)
|
||||
|
||||
Reference in New Issue
Block a user