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 .netrc
file.
Linux or OSX
- Create a file called
.netrc
in 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.
machine fisheye1.mycompany.com login myusername password mypassword machine fisheye2.mycompany.com login myotherusername password myotherpassword
- And that's it! Subsequent
git clone
,git pull
andgit push
requests will be authenticated using the credentials specified in this file.
Windows
- Create a text file called
_netrc
in 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_netrc
in a directory with no spaces in it (for examplec:\curl-auth\
) then set your%HOME%
environment variable to point to the newly created directory. - Add credentials to the file for the server or servers you want to store credentials for, using the format from the Linux or OSX section above.
Related Links
Unable to render {children}. Page not found: Repository Management FAQ.