Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

upload-to-github: also guess user from ~/.netrc

... unless it is specified explicitly, of course...

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
  • Loading branch information...
commit 1aecd3d48aa9e9a54106521c87c1cdc90b4ca010 1 parent 2c2276f
@dscho dscho authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 bin/upload-to-github.sh
View
4 bin/upload-to-github.sh
@@ -79,6 +79,10 @@ msysGit-fullinstall-*)
;;
esac
+test -z "$user" &&
+user="$(grep -A2 -i '^machine *api.github.com' < "$HOME/.netrc" 2> /dev/null |
+ sed -n 's|login *||pi')"
+
if test -z "$description" || test -z "$user" || test -z "$repository"
then
echo "$USAGE"
Please sign in to comment.
Something went wrong with that request. Please try again.