It's possible to authenticate with a docker repo automatically using rsa certificates as described here.
However, this sets up this authentication for all users. This is a problem because I have personal certificates I want to use to authenticate with from my account only. If I followed the steps above then anyone who happened to be using the same VM would automatically authenticate with docker as me, which I don't want.
So how can I configure docker so I get the same convenience of automatic authentication with my cert without risking someone else on the machine accidentally using the same certs to authenticate?
Podman can do this trick: https://docs.podman.io/en/latest/markdown/podman-login.1.html
--cert-dir=path
Use certificates at path (*.crt, *.cert, *.key) to connect to the registry. (Default: /etc/containers/certs.d) Please
refer to containers-certs.d(5) for details. (This option is not
available with the remote Podman client, including Mac and Windows
(excluding WSL2) machines)
$ podman login --cert-dir /home/myuser/certs.d/ -u foo -p bar localhost:5000
Login Succeeded!
I have tried with various SMTP servers but I cannot get Jenkins to send an email. I get the could not connect error - nothing else, just this error.
See the screenshot below.
Any ideas why? I am using the Jenkins docker container, firewall is off.
I do not have an email server running inside the Jenkins container. I figure I don't need one if Gmail is going to send the email for me.
Your Gmail configuration looks correct. Usually these issues come down to a firewall, but if you are sure that is not the problem it could be your Gmail account settings.
An additional configuration is required in the Gmail account from which the mail is being triggered. This step authorizes apps like Jenkins to use the Gmail account.
Gmail - Allowing less secure apps to access your account
After performing this step emails should be triggered successfully.
UNBELIEVABLE. 2 days later. Fixed.
I found that my Cloud computing provider (Scaleway) disable outgoing SMTP by default and I had to enable SMTP via their web interface. Details here.
These commands helped me to determine that outgoing SMTP was in fact as dead as a donut:
telnet smtp.gmail.com 465
openssl s_client -connect smtp.gmail.com:587 -starttls smtp
echo "Hello world" | swaks -4 --server smtp.gmail.com:587 --from user#gmail.com --to user#example.net -tls --tls-protocol sslv3 --auth PLAIN --auth-user user#gmail.com --auth-password 7654321 --h-Subject "Test message" --body -
I am trying to connect to the C panel server through ssh but I get a timeout.
What I have tried
I have tried ssh user#domain.com and user#ipaddress to no avail
I already tried using the ftp user account but the result is the same. I don't know what to do.
The goal
I have to connect in order to install rails on the server and this is a huge delay.
Please help.
the error is
ssh: connect to host xxx.co.ke port 22: Connection timed out
There are many possible reasons for this.
SSH is not configured on this port
SSH is not enabled on this server
The firewall on your server is blocking your IP
We will need more information like are you having a VPS or a shared hosting plan as many hosting companies do not allow ssh in shared hosting plans. If this is a VPS then you will need to ask your hosting provider the SSH port and try. Are you able to ping your server IP. If not, then you will also need to check in the server firewall if your IP is blocked.
You are using wrong SSH port OR your ISP ip is blocked on your server and due to that you are getting connection time out, You need to confirm your SSH server port from your hosting provider and ask them to enable SSH access for your cPanel user.
I've installed Jenkins via Openshift redhat (https://openshift.redhat.com) .. The installation of Jenkins is done..
To access to the interface of Jenkins I've used the username and password of my Openshift account and unfortunately it doesn't work ...
This is the error :
I want to mention that the setup of rhc is done in my local also.
Any idea ?
Thank you
I found the answer
To resume : I should login via ssh to my Jenkins application :
ssh 56b969d****#jenkins-***.rhcloud.com
You will find the exact ssh command for your app on the openshift page for the jenkins application under Remote Access hidden behind a hyperlink that says Want to log in to your application?
After that I do :
cat jenkins/env/JENKINS_USERNAME
cat jenkins/env/JENKINS_PASSWORD
And I ve got my login :
ssh into your application and use the env | grep JENKINS command to view your username/password for jenkins: https://developers.openshift.com/en/managing-environment-variables.html#jenkins-variables
Yep click below link(want to log in to your application) on your applications page, you will see a ssh string for you to login
Then
cat jenkins/env/JENKINS_USERNAME
cat jenkins/env/JENKINS_PASSWORD
you will see your username and password
I'm trying to use email sending in jenkins. I leave default values, click on 'Test configuration' button and get error:
Failed to send out e-mail
javax.mail.MessagingException: Could not connect to SMTP host:
localhost, port: 25; nested exception is: java.net.SocketException:
Permission denied: connect
at
com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1934)
at
com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:638)
What I missed? It's not working by default?
I configured Jenkins with my gmail account using the settings as given in the image below.
I had similar problem couldn't send email via zoho. The configurations were: SMPT TLS Zoho Configurations
I just need to change system admin address in jenkins configurations to the same one in email-notifications.
Here you can find the system admin e-mail:
Manage Jenkins -> Configure System -> Jenkins Location -> System Admin e-mail address
If anyone is still having issues with emails in Jenkins, a lot has changed since then.
If you have a custom domain name for g-mail and it requires a 2-step authentication to login, for example you#yourcompany.com,
SMTP server should still be smtp.gmail.com
Default user e-mail suffix should be #yourcompany.com
Because Google no longer allows you to simply use your default e-mail password to login via any outside apps, in this case Jenkins. It is a lot more secure to let Google create a custom password for Jenkins rather than turning off G-Mail's security features to allow Jenkins access to your account.
Create the App Password here:
https://security.google.com/settings/security/apppasswords
Use the generated password in Jenkins -> Configure Systems -> E-Mail Configuration
I was also struggling with this error. Here is how I resolved it.
1. Google account settings:
Go to Gmail account settings -> Forwarding and POP/IMAP -> IMAP Access -> Enable IMAP (This is to enable both IMAP & SMTP settings)
Check configuration details that are mentioned as:
Outgoing Mail (SMTP) Server: smtp.gmail.com
Requires SSL: Yes
Requires TLS: Yes (if available)
Requires Authentication: Yes
Port for SSL: 465
Port for TLS/STARTTLS: 587
(Rather than going with settings mentioned by anyone, please checkout your account for this info as settings/configurations keep on changing. )
2. Jenkins (2.121.3) settings:
Manage Jenkins -> Configure System -> Scroll down to E-mail Notification tab -> Advanced
Use SMTP Authentication: checked
User Name: <your gmail id>
Password: <your password>
Use SSL: checked
SMTP Port: 465
Reply-To Address: Optional (I left it blank. You can give any email id you want)
Charset: UTF-8
Enable "Test configuration by sending test e-mail", give test email id and hit "test configuration" button
NOTE:
Make sure you are connected to open network (that is not antivirus protected or antivirus may block your emails). I used my phone internet instead of office internet for testing this.
I didn't change any McAfee settings for doing this. Just switch your internet to open one.
There is no SMTP server running on localhost or you don't have the permission to connect to it.
Check the configuration of Jenkins.
You probably don't have SMTP running on your machine, which is the usual state for Windows or Mac servers.
To test this, use any known mail-server for that, for example - if you have a gmail account, try this:
SMTP server: smtp.gmail.com
Default user e-mail suffix: #something.something
Sender E-mail Address: your-mail#gmail.com
If planning to use the mail-notifications as part of your build-process,
it is best to set the SMTP properly, or maybe move the Jenkins/Hudson server to a machine that supports this.
Check if your provider blocks port 25.
In order to make a proper test
telnet smtp.gmail.com 25
If you receive an answer like this:
telnet: connect to address 74.125.206.108: Connection refused
You should go with smtp authentication as described in harikrishna-pai's answer
I had same issue and managed to resolved by following,
Generate Gmail App Password,
Gmail App
In Jenkins use the app password,
Jenkin's Configuration
I Had the same issue.
After witch hunting a lot, I found a solution as below:
even turn on - less secure apps, I was struggling since 6 hour.
the second option:
And go to
https://accounts.google.com/DisplayUnlockCaptcha
and click Continue.
this resolved the issue.
I had the same issue as i was using avast it blocked smtp mails so i disabled it and it worked