I am assuming that you have verified all port related connectivity issue from your workstation and you do not have any access related issue to connect to Pega Package Server.
Also that you followed PDN guidelines and have setup the Pega Package Server correctly.
Please set the Robot Manager base URL in your CommonConfig file.
It should end in "/prweb/" and set enabled to true.
Provide Packager Server URL in StudioConfig file.
Now start your studio.
You should get a pop up with fields "Email Address" and "Password".
Please provide Pega platform operator id you use to connect to robot manager for robot registration and also password for the same. To be specific RPARegistration Operator.
If credentials are correct Pega Robot Studio would open successfully. If not you would keep receiving the pop-up window.
Now if you deploy your code from studio by selecting the publish to package server option.(Which would already be checked.)
You should be able to deploy your code successfully.
Unless a solution package with same package id and package version is already present in your package server.(Please do not worry you would get a pop-up message for the same.)
Package related information is sent to Pega Robot Manager. So that automation package could be deployed to target Virtual Machine.(That is the main advantage.)
Each time you modify your configuration file . Please reopen your studio.
Also verify the location of the configuration file being referred to.