-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generating Self Singed Certificated for TeamCity Agent & Connection to Teamcity Server in Docker #74
Comments
Old but I just ran into the same problem. This is applicable on the Firstly, you need to grab Changes to TEAMCITY_AGENT_OPTS_ACTUAL="$TEAMCITY_AGENT_OPTS -ea $TEAMCITY_AGENT_MEM_OPTS_ACTUAL -Dteamcity_logs=$LOG_DIR/ -Djavax.net.ssl.keyStore=/opt/java/openjdk/jre/lib/security/cacerts -Djavax.net.ssl.trustStore=/opt/java/openjdk/jre/lib/security/cacerts -Djavax.net.ssl.keyStorePassword=changeit -Djavax.net.ssl.trustStorePassword=changeit" And within the
Finally, copy the cert and updated
|
You don't have to patch the Dockerfile or rebuild the image: a correct combination of environment variables ( # First, import your certificate into a keystore file (mind the keystore type, the default/implicit one failed in my tests)
keytool -importcert -alias my_cert -file ~/my_cert.pem -deststoretype jks -keystore /etc/teamcity_agent/conf/trustedCertificates/my_keystore.jks -storepass changeit
# Now, run the agent
sudo docker run -e 'TEAMCITY_AGENT_OPTS=-Djavax.net.ssl.keyStore=/data/teamcity_agent/conf/trustedCertificates/my_keystore.jks -Djavax.net.ssl.trustStore=/data/teamcity_agent/conf/trustedCertificates/my_keystore.jks -Djavax.net.ssl.keyStorePassword=changeit -Djavax.net.ssl.trustStorePassword=changeit' -e SERVER_URL="https://teamcity.internal.your-org.com" -v /etc/teamcity_agent/conf/:/data/teamcity_agent/conf --name TeamcityAgent -u 0 --privileged -e DOCKER_IN_DOCKER=start jetbrains/teamcity-agent:2021.1.1-linux-sudo (I had to run Docker-in-Docker, hence this specific image and addition options) What I also tried but unsuccessfully:
Hope this helps. |
We are evaluating Teamcity for an Enterprise solution.
What I am trying to achieve.
✅ Create and host Teamcity Server
✅ It is working with SSL able to access outside the home network
✅ Install Agent 1 and check the connection with the Teamcity server
✗ Agent SSL handshake with Teamcity Server
My Docker Compose
Error from Agent Log :
What I am missing
The text was updated successfully, but these errors were encountered: