Username and password of Jenkins on Openshift - jenkins

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

Related

Jenkins issues in default credentials

I am new to Jenkins. While I am trying to install Jenkins in Linux in my laptop and deployed the jenkins.war in apache server and tried to start jenkins using homepage using url https://localhost:8080/jenkins , but it's asking for username and password, I have given admin and system generated password on apache server and all other admin/ admin also but nothing working.
Can anyone tell me the default username and password for Jenkins?
Check the content of /var/lib/jenkins/secrets/initialAdminPassword.
If jenkins home is different then /secrets/initialAdminPassword.

How to resolve the issue in Jenkins

I am working on Jenkins by following below link and I am new to working on Jenkins.
https://blogs.msdn.microsoft.com/visualstudioalm/2016/05/27/continuous-deploymentdelivery-with-jenkins-and-vs-team-services/
Here I am facing the issue when I am installing the Jenkins its redirect to localhost URL and displaying the web page is like below figure and I am downloading the Jenkins from the below link. after redirect that its shows the Jenkins login and here I am informing before that I am not set the any logging details at any where in the Jenkins.
https://jenkins.io/
On Linux, default "admin" user password is available in /var/lib/jenkins/secrets/initialAdminPassword file.
I am not 100% sure about windows, you can check if secrets\initialAdminPassword file is available in Jenkins install directory. If yes, then try to login with credentials mentioned in this file

Docker hello-world: authentication error

I'm just getting started with docker. I'm following the instructions specified here https://docs.docker.com/windows/step_one/
I installed docker (1.10.2) on windows 10 & ran docker run hello-world . But, I'm getting an authentication error while the tutorial doesn't mentioned anything about it.
Here's the message I received.
$ docker run hello-world
Unable to find image 'hello-world:latest' locally
docker: Error response from daemon: Authentication is required: Get https://registry-1.docker.io/v2/library/hello-world/manifests/latest: unauthorized: incorrect username or password.
See 'C:\Program Files\Docker Toolbox\docker.exe run --help'.
I searched google & here, but couldn't find anything similar to this error message.
Thanks!
Please run docker login at first time when you run any other docker commands.
You can log into any public or private repository for which you have credentials. When you log in, the command stores encoded credentials in $HOME/.docker/config.json on Linux or%USERPROFILE%/.docker/config.json on Windows.
If you login through your emailId it does not works.
On windows login using your docker hub id.
You can access by your username.
Probably it can happen if you were logged in before, by console or by kitematic.
You can try docker logout if you want use docker without auth.
In this case Authentication is required: shouldn't appear again.
I have solved this issue in macOS Mojave (version : 10.14.3)
docker login
Login with your username not email id then its working fine.
On macOS you need to login from the commandline using
docker login
Also you must use your username and not your email
on ubuntu:
docker login
so if you don't know your username password, you probably haven't created one.
what you should do, is go and create an id on docker
visit: official docker webpage
just like any other github accout ,they will ask you for the username, provide one and they will authenticate same as github, once done , put your email and password. verify it and you are now good to go.
ok! now coming to the point...
if you were facing the problem like the problem statement ,
just do
docker login
enter username and password, that you just provided .
you will be displayed ,"LOGIN succeeded"
now run this command
docker run hello-world
beware of the dash '-' sign , i myself stuck with this issue, and you are done.
thanks:)
run docker login to execute any other docker commands. or just logout if you want to use public hubs docker logout
For worked trying docker logout and then docker login with the proper credentials
For those who logged in via their email address associated with their account during the Docker desktop installation process - this problem seems to occur because the terminal has also stored those credentials, but for some reason it only accepts login's via your actual username.
If you go to DockerHub you should see it in the upper right corner.
Try running docker login with that username, and you should be all set!
docker login
# username from dockerhub
# the same password
Setting my vNAT for docker dns server to 8.8.8.8 resolved my issue on windows just try might help thanks

Deploy to IBM Containers without cf/ice CLI

I currently have a workflow that goes like this: Bitbucket -> Wercker.
Wercker correctly builds my app, but when it comes to deploying I am lost. I am attempting to deploy to my IBM Containers registry on Bluemix (recently out of beta).
Running docker login registry.ng.bluemix.net with my IBM account credentials returns a 401: bad credentials on my local machine (boot2docker on OSX). It does the same on Wercker in my deploy step.
Here is my deploy step:
deploy:
box:
id: node
tag: 0.12.6-slim
steps:
- internal/docker-push:
username: $USERNAME
password: $PASSWORD
tag: main
entrypoint: node bundle/main.js
repository: <my namespace/<my container name> (removed for this post)
registry: registry.ng.bluemix.net
As you can see: I have the username and password passed in as environment variables as per the Wercker Docs (and I have tested that they are passed in correctly).
Basically: how do you push containers to an IBM registry WITHOUT using the ice/cf CLI? I have a feeling that I'm missing something obvious. I just can't find it.
You need to use either the Containers plugin for cf or the ICE tool to login.
Documentation
Cloud Foundry plug-in:
cf ic login
ICE:
ice login
Can you create a custom script that can log in first? If the environment already has cf with the containers extension:
- script:
name: Custom login for Bluemix Containers
code: cf login -u <username> -p <password> -o <org> -s <space>
Excuse my wercker newb.
The problem is that the authentication with the registry uses a token rather than your userID and password. ice login and cf ic login take care of that but unfortunately a straight up docker login won't work.
Some scripts for initializing, building and cleaning up images are also available here: https://github.com/Osthanes/docker_builder. These are used in the DevOps Services delivery pipeline which is likely a similar flow to what you are building.
Turns out: it's very possible.
Basically:
Install CF cli
cf login -a https://api.ng.bluemix.net
Extract token from ~/.cf/config.json (text after bearer in AccessToken + "|" + OrganizationFields.Guid
It depends what you want to do with it. I have a very detailed write-up here on Github.
You can use the token as the password, passing 'bearer' as the username.
#mods: Is this enough for me to link to another site? I really hate to duplicate stuff like this...
You can now generate tokens to access the IBM Bluemix Container Registry using the container-registry plugin for the bx command.
These tokens can be read-only or read-write and either non-expiring (unless revoked) or expire after 24 hours.
The tokens can be used directly with docker login.
Read the docs here

How to download files from authenticate required Jenkins job workspace via command line

How to do it if:
Jenkins server need log in first before access anything. Anonymous user has no read access
From a Linux bash in another machine (or Windows cmd)
The Jenkins supports basic authentication. So you can specify your username and password in the command for basic authentication, like below with curl:
curl -u your_username:your_password http://<your_jenkins_host>/job/<job_name>/<job_id>/artifact/<file_name>

Resources