diff options
author | Ronald Bradford <ronald.bradford@gmail.com> | 2015-08-31 13:37:14 -0400 |
---|---|---|
committer | Ronald Bradford <ronald.bradford@gmail.com> | 2015-09-29 13:02:15 -0400 |
commit | 0c2712df5a47112507fccdd4d1e9b001460dba4f (patch) | |
tree | e942323c3e48e4a2403370b0c9ffc5f741e79056 | |
parent | 7a25bdca0c0d7c7813a31f383f5fc6117480060d (diff) | |
download | oslo-incubator-0c2712df5a47112507fccdd4d1e9b001460dba4f.tar.gz |
Improve error messaging for accessing review.o.o
If the default OS user id does not match your gerrit username you
receive a blanket permission denied error message if retrieving the
list of gerrit projects fails.
This attempts to better identify the username, and provide a more
meaningful error message if the list projects function fails.
Change-Id: Ib05d3e7e4d772f42ad94d362bf34b4a36fc5cceb
-rwxr-xr-x | tools/clone_openstack.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/clone_openstack.sh b/tools/clone_openstack.sh index 787c5419..c59e66c8 100755 --- a/tools/clone_openstack.sh +++ b/tools/clone_openstack.sh @@ -168,6 +168,18 @@ projects="$*" if [ -z "$projects" ] then projects=$(ssh review.openstack.org -p 29418 gerrit ls-projects | grep -v 'attic') + RC=$? + if [ $RC -ne 0 ] + then + echo "Unable to obtain a list of projects from gerrit. Check your ssh credientials for review.openstack.org" + userid=`id -un` + gerrit_userid=`git config --get gitreview.username` + if [ $userid != $gerrit_userid ] + then + echo "Identified a possible userid difference between $userid and $gerrit_userid" + fi + exit $RC + fi else # Go ahead and set things up so we will work with stackforge # repositories, in case the caller has specified one on the |