Phabricator/pushing over https

From Wikitech

How to git push over https to repos on Phabricator Diffusion

If you have a git repository [Phabricator (Diffusion)], this is how you can push changes over https (instead of ssh).


Set a VCS password

First, you are going to set a 'version control password' in your Phabricator profile. This is a "once only" global setting, not per repo.

Login, click your profile icon in the upper right corner, -> Settings -> Authentication -> VCS Password.

Because this is security-related change you will now enter "High Security Mode".

You will be asked for an "App Code". Enter a 2-factor code from your authentication app (Google Authenticator, Authy).

Now you set the VCS password to something random, separate from your user password and keep it in your password store.

You can now leave "High Security Mode" as well.

Clone repo and push

Next go to 'Code' -> 'Source Repositories' which brings you to Diffusion.

Click 'Hosted on Phabricator' and find your repository in the list, click on it and then the "clone" button.

If you see multiple URIs copy only the https:// URI, ignore ssh:// and http:// URIs.

On your local computer run:

git clone <paste link from above>

Now make changes as normal and 'git add ..', 'git commit' as usual.

Once you 'git push' you will be asked for your username and password. Enter your Phabricator username, and the VCS password you setup before.

~/httpspush$ git push
Username for 'https://phabricator.wikimedia.org': Dzahn
Password for 'https://Dzahn@phabricator.wikimedia.org': 

Hit enter and now changes should be pushed.

Afterwards

Once you confirmed this works for you please tell User:Dzahn, ideally via phab:T296022, that you are done and the name of the repo.

He will then deactivate the http:// and ssh:// URIs for your repo.