Open jaylong255 opened 2 weeks ago
To set up an SSL certificate on a Windows server, follow these steps:
Open IIS Manager:
Start
> Control Panel
> Administrative Tools
> Internet Information Services (IIS) Manager
.Create a CSR:
Server Certificates
.Create Certificate Request...
in the Actions pane.Complete the Certificate Request:
Server Certificates
, click Complete Certificate Request...
in the Actions pane.Import Intermediate Certificates (if necessary):
Import...
option instead, selecting the intermediate certificate files.Open Site Bindings:
Bindings...
in the Actions pane.Add HTTPS Binding:
Add...
in the Site Bindings window.https
as the Type.Automated Tools: For automated SSL certificate management, tools like Certbot or scripts that integrate with Let's Encrypt can be used, although this is more common on Linux servers. For Windows, third-party tools or scripts might be necessary.
Self-Signed Certificates: If you're setting up for testing or internal use, you could create a self-signed certificate using tools like OpenSSL or through IIS for self-signed certificates. However, these are not trusted by default by browsers for public websites.
SSL/TLS Configuration: Ensure your server's SSL/TLS settings are optimized. IIS has settings for SSL/TLS versions and cipher suites which should be configured for security best practices.
By following these steps, you'll have an SSL certificate installed and your site secured with HTTPS. Remember, certificate management includes renewals, so plan for that in advance or use automation for renewal where possible.
Here are steps to troubleshoot and resolve SSL verification issues when accessing a Git repository from Azure Pipelines on a Windows Server 2012 environment:
Public Domain but VPN Access: Your Git server uses a public domain, but the actual access to the repo is restricted by VPN, suggesting that the certificate might not be signed by a commonly trusted CA, or there could be issues with certificate chain validation.
SSL Verification Error: This indicates that the client (in this case, Azure Pipelines) is not trusting the SSL certificate of your Git server. This can happen due to several reasons:
Verify Certificate Setup:
Certificate Trust: Ensure the SSL certificate is trusted by the server where Azure Pipelines runs.
certlm.msc
to view the Local Machine certificate store.Trusted Root Certification Authorities
for root certificates or Intermediate Certification Authorities
for intermediate certificates.Certificate Path: Ensure the certificate chain is complete. Sometimes, missing intermediate certificates can cause verification issues.
Git Configuration for SSL:
If the certificate isn't universally trusted, you might configure Git to use the correct CA bundle:
git config --global http.sslCAInfo "path\to\your\certificate.pem"
Replace "path\to\your\certificate.pem"
with the path to the CA certificate or your server's certificate if it's self-signed.
Alternatively, to use Windows' certificate store:
git config --global http.sslbackend schannel
This tells Git to use Windows' certificate validation, which should trust certificates in the Windows certificate store.
Azure Pipelines Agent Configuration:
Ensure the Azure Pipelines agent is configured to use the system's trust store. If you're using a self-signed certificate or one from an internal CA, you need to add this certificate to the agent's machine certificate store.
For Azure Pipelines, you can set up a variable for the agent to use:
variables:
GIT_SSL_CAINFO: 'C:\path\to\your\certificate.pem'
Or for using the system store:
variables:
GIT_SSL_BACKEND: 'schannel'
Testing with Verbose Git Commands:
GIT_CURL_VERBOSE=1 git fetch
Temporary Workaround:
git -c http.sslVerify=false fetch
However, this should not be used in production as it compromises security.
Update or Reconfigure Azure Pipelines:
This approach should help you resolve or at least diagnose the SSL verification issues in your Azure Pipelines setup.
When working with an older version of Azure Pipelines that uses the classic web interface for configuration rather than YAML, here's how you can manage and change your pipeline configurations:
Navigate to Pipelines:
Select Your Pipeline:
Edit the Pipeline:
Tasks Tab: Here, you'll see the list of tasks currently configured for this phase of the pipeline.
Build Steps or Release Steps: Depending on if you're working on a build or release pipeline, you'll adjust tasks accordingly.
Service Connections: If you need to change how your pipeline connects to external services (like Azure subscriptions for deployment), go to Project Settings > Service Connections and manage them there.
Security: Adjust permissions for who can edit the pipeline or view its results under Pipeline settings or Security tab.
Remember, with classic pipelines, you might not have all the features that YAML pipelines offer in newer versions of Azure Pipelines, like some advanced triggers or conditions, but these steps will cover most of the configuration changes you might need in an older setup.
Internal Contacts
Halo Link
https://engineering.mvss365.com/ticket?id=0059479