I usually log in to OS X El Capitan without administrator rights. Homebrew upholds the principle that packages can be installed and used without administrator/root access, i.e. without using the sudo command. However, it seems that administrator access is necessary for installing Homebrew. Running the script from my normal non-admin user's Terminal yields
This script requires the user [user] to be an Administrator. If this sucks for you then you can install Homebrew in your home directory or however you please; please refer to our homepage. If you still want to use this script set your user to be an Administrator in System Preferences or `su' to a non-root user with Administrator privileges.
First, unfortunately, the homepage does not say much more about how to install in my home directory and what difference that actually makes from the usual way to install.
Second, running 'su' and entering my password yields
su: Sorry
Then, running 'sudo su' yields
[user] is not in the sudoers file. This incident will be reported.
This did not feel right, either. (See also Why can't I run `su`? (and how should I do?))
Third, I simply opened a shell with my administrator account 'login [user-admin]' to install Homebrew. But when I later tried to install a package as the normal non-admin user/ran 'brew doctor', I did get a number of errors about directories not being writable. Again, a fix is suggested at https://stackoverflow.com/questions/14527521/brew-doctor-says-warning-usr-local-include-isnt-writable but I was not too sure whether there is only one /usr/local on my computer, or whether there is one for every user so that the directories in question would actually be those of my admin user (and thus it might be weird to give my non-admin user access to those). Also, it were quite many directories (more than 10) which made me suspicous.
Forth, and finally, what I did was to give my non-admin user administrator rights, installed as that user, and then made the user a normal, non-admin user again.
Now, everything seems to be OK, but I wonder whether this was actually the/a correct way, since the script error quoted above didn't actually say whether I need to permanently have Administrator priviledges, or whether it is OK to only take them during the installation process of Homebrew itself.