forked from olorunfemi007/nodejs-application
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Olorunfemi Kawonise
authored and
Olorunfemi Kawonise
committed
Jul 2, 2023
1 parent
68169ea
commit 866d8da
Showing
1 changed file
with
15 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,17 @@ | ||
#!/bin/bash | ||
registry_url="https://52.207.254.164:8081/repository/fintech-app-release/" | ||
|
||
# Provide your Nexus registry username and password | ||
username=admin | ||
password=admin123 | ||
|
||
# Set your npm username and password | ||
NPM_USERNAME="admin" | ||
NPM_PASSWORD="admin123" | ||
|
||
# Run the npm login command with provided credentials | ||
echo -e "${NPM_USERNAME}\n${NPM_PASSWORD}\n\n" | npm login --registry=https://52.207.254.164:8081/repository/fintech-app-release/ | ||
# Run npm login command using expect | ||
expect <<EOF | ||
spawn npm login --registry="$registry_url" | ||
expect "Username: " | ||
send "$username\r" | ||
expect "Password: " | ||
send "$password\r" | ||
expect "Email: (this IS public) " | ||
send "\r" | ||
expect eof | ||
EOF |