문제

Is there a way to clone a repository, add a second remote, but use a different/separate user for that second remote automatically when pushing/pulling?

My use case is to have the remote "origin" only for pulling (actually checking out) changes with "user A" and to have remote "my-second-remote" for pulling AND pushing with "user B".

Is there a way to set up a separate user for each remote?

도움이 되었습니까?

해결책

Do you mean the user which is used to authenticate against each remote? Then yes — just embed the user name to the remote's URL.

다른 팁

No, this is impossible in Git. Name and email are embedded in the commits.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top