I ran into the same problem and ultimately I made the shared scripts available without requiring a login via https. I also considered putting them on a file server available from the network but that does not work to great across platforms.
Another possibility is to write a plugin and putting it on a (maven) artifact repository for which you can specify credentials. However if you want to specify your artifact URL in the common script, fetching the artifact from that repo does not work so great.
Here is a example of such a script discovering scripts from the classpath.
You could consider exposing only this plugin and restricting access to the actual script with credentials stored in the project properties or local gradle installation.