Skip to content

Commit

Permalink
Removed request for password and allow curl to capture it
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerard Hickey authored and Gerard Hickey committed Feb 4, 2017
1 parent 1c3621a commit a588462
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions bin/git-fork
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ if [[ -z "$user" ]]; then
fi

if [[ -z "$token" ]]; then
echo "Enter github password"
read password
echo "Enter github two-factor authentication code (leave blank if not set up)"
read MFA_CODE
fi
Expand All @@ -55,10 +53,10 @@ header_info=''
if [[ -n "$token" ]]; then
header_info="-H \"Authorization: token ${token}\""
elif [[ -n "$MFA_CODE" ]]; then
auth_info="-u \"$user:$password\""
auth_info="-u \"$user\""
header_info="-H \"X-GitHub-OTP: $MFA_CODE\""
elif [[ -n "$password" ]]; then
auth_info="-u \"$user:$password\""
auth_info="-u \"$user\""
else
echo "No login credentials specified."
exit 1
Expand Down

0 comments on commit a588462

Please sign in to comment.