If you are behind a corporate proxy, you need to add the proxy details before lein or git can work.

Leiningen

Add the following environment variable name with value as given.

# env name
http_proxy
# env value
http://username:password@proxyurl:port
# env name
https_proxy
# env value
http://username:password@proxyurl:port

After setting the above, lein will be able to connect through the proxy.

GitHub

Add the following in a file called .gitconfig under C:\Users\username.

[http]
    proxy = http://username:password@proxyurl:port
[https]
    proxy = http://username:password@proxyurl:port

If the ssh protocol and port is blocked, you can use the https version to clone and push changes to GitHub. Give the GitHub username and password when prompted. However if you have 2FA enabled, you need to first create an access token. Go to Personal access token under GitHub settings and generate one. Under permissions, only repo needs to be enabled to push the changes to GitHub. When you push, a GitHub popup will prompt for authentication, where you can enter your GitHub credentials. Next the git bash will prompt for authentication where you should enter the generated access token for your password. It should go through the proxy.