[FishEye Knowledge Base]
Currently, FishEye only supports HTTP or HTTPS for pushing and pulling from Git repositories. Git has no method of caching the user's credentials, so you need to re-enter them each time you perform a clone, push or pull.
Fortunately, there is a mechanism that allows you to specify which credentials to use for which server: the
Git uses a utility called cURL under the covers, which respects the use of the .netrc file. Be aware that other applications that use curl to make requests to servers defined in your
.netrc file will also now be authenticated using these credentials. Also, this method of authentication is potentially unsuitable if you are accessing your FishEye server via a proxy, as all curl requests that target a path on that proxy server will be authenticated using your
cURL will not match the machine name in your .netrc if it has a username in it, so make sure you edit your
.git/config file in the root of your clone of the repository and remove the user and '@' part from any clone url's (url fields) that look like
https://email@example.com/... so instead they look like
.netrcin your home directory (
~/.netrc). Unfortunately, the syntax requires you to store your passwords in plain text - so make sure you modify the file permissions to make it readable only to you.
Add credentials to the file for the server or servers you want to store credentials for, using the format below. You may use either IP addresses or hostnames, and you do not need to specify a port number, even if you're running FishEye on a non-standard port.
git pushrequests will be authenticated using the credentials specified in this file.
_netrcin your home directory (e.g.
c:\users\kannonboy\_netrc). Curl has problems resolving your home directory if it contains spaces in its path (e.g.
c:\Documents and Settings\kannonboy). However, you can update your
%HOME%environment variable to point to any old directory, so create your
_netrcin a directory with no spaces in it (for example
c:\curl-auth\) then set your
%HOME%environment variable to point to the newly created directory.