Reputation: 61
Thanks in advance, and sorry if I am using inexact terminology when it comes to git. I'm trying my best.
How do I perform a git-fetch with a different user than the one I am logged in on? I am using a mac, and I have tried doing this both from the command line and using SourceTree, but failed. Currently I need to go through the following arduous procedure whenever I want to do something git related on the repository I am accessing:
With some scripts this isn't too painful, but these are very big directories I am dealing with, so chowning them takes a while, and I would like to avoid the hassle. I have been doing this for six months now. I am using both the command line and SourceTree, and I have not found a way to get around this with either (SourceTree appears to support using a different username for a repository, but it's not working for me).
Edit: I may not modify the permissions of the files.
Upvotes: 0
Views: 321
Reputation: 61
The unexpected answer to my question is this - inserting "username@" (with the actual username) between the "ssh://" address/protocol-prefix and the address itself via "git config -e", and not through SourceTree's UI, did the trick. Weird.
Upvotes: 1