GitLab unable to pull docker image from registry container after changed password - gitlab-ci-runner

Recently I built a Self-Hosted GitLab Server, and it was working fine. However, after I updated the GitLab account's password, I was unable to pull image from registry container. I getting following error:
unauthorized: HTTP Basic: Access denied. The provided password or token is incorrect or your account has 2FA enabled and you must use a personal access token instead of a password.
Following is the command I run in my runner server after updated password
docker login gitlab.{name}.com:5050 -u {username} -p {password}
and the result returned from the command
Login Succeeded
After I change my GitLab account password to previous password, it working fine again. May I know why is this happening and how to resolve this?
Expected result will be able to pull image from registry container after updated password, previous password cache should be cleared.

Related

mysql cant log in as a regular user using root, same as phpmyadmin

I installedd LLMP on default, fresh Linux Mint 18 Mate install. Everything is updated and pretty fresh. Then the strange problem occured with logging into the database.
My exact steps:
1. Installed lighttpd. It crashed until I installed also gamin package, then it works.
Installed php7 with php-mysql
Installed mariadb-server
Run mysql_secure_install, defined new root password, answered all Y for deleting test db, disabling anonymous accounts and disallowing root login from tcp, etc. Everything was suggested as a valid, default answer.
Installed phpmyadmin, this fails on post-install, but running apt-get install -f repaired it and finished install correctly.
WTF1: Now, as root user I can login without password to mysql in the console.
WTF2: I can't login to mysql as a regular user, even when I give good password. It says "ERROR 1698 (28000): Access denied for user 'root'#'localhost'"
WTF3: I can't also login to database using phpmyadmin, using root account and proper password, when run on my localhost workstation via lighttpd.
What the heck is going on? My expectation was it should work out of the box, allowing me to login ONLY with root password either on CLI or via phpmyadmin. What is wrong?
I solved this and the answer is in the comment to the question.

OpenProject user unable to login to mysql

Current situation is as follows:
I have succesfully installed OpenProject on Ubuntu 14.04 server using the guide from the official website (https://www.openproject.org/open-source/download/packaged-installation-guide/). When configuring for the first time I let the configuration manager install MySQL and create the appropriate database(s).
Now I'm trying to migrate and for this to happen, I need outside access to the information_schema (schema) and database. This is supposedly done using the openproject user but I cannot seem to be able to login using this user on the commandline.
Just to be sure, I just statement below:
mysql -u openproject -D openproject -p
Then I entered the right password and press enter. It gets the default ERROR 1045.
I am however able to login using root user and debian-sys-maint user which was created on the initial install step. The password I used for these accounts were found in the file under "/etc/openproject/installer.dat". I am absolutely positive I use the correct password, for the application runs fine under said user.
Is there a setting in mysql that I am missing that would block users from making connection using the commandline utility?
Figured it out. In MySQL the host 127.0.0.1 and localhost are essentially different. User OpenProject by default gets assigned to host 127.0.0.1, so naturally connecting openproject#localhost did not work, though root account has different user profiles (4 to be exact) allowing it to connect to both localhost and 127.0.0.1 .
TLDR version:
Use the statement as follows:
mysql -u openproject -h 127.0.0.1 -p
Should do the trick.

How to fix URL given after creating a new repo's in gitlab?

When creating a new project, on the final step gitlab give me instructions to setup my repo, but the URL to the repo don't work. For instance, to add remote branch, I got:
git remote add origin git#git.srv.com:root/home.git
Note: My gitlab instance is running on a virtual machine whom host forward SSH's requests on port 1122 to the VM's port 22. So locally gitlab is reach on port 22.
Given URL doesn't work
Pushing
Keep asking for password. Neither my SSH passphrase nor my account's password works:
git push -u manu master
Password:
Password:
Password:
Permission denied (publickey,keyboard-interactive).
fatal: The remote end hung up unexpectedly
Cloning
Same here, keep prompting for password:
git clone git#git.srv.com:1122/root/home.git
Cloning into 'home'...
Password:
Fixing the URL (add protocol and port)
If I simply add a ssh:// prefix and the port to the server (:1122/) everything work smoothly:
git remote add manu ssh://git#git.srv.com:1122/root/home.git
The surest way to debug this kind of ssh access is to launch an sshd -d session on the server and see the output (it is a one-time debug connection).
Note that git#git.srv.com:root/home.git is an url using an scp syntax, which means you have a ~/.ssh/config file, with an entry named git.srv.com, which can reference your private key (IdentityFile), as in this question for instance.
You can also check its content to see if it does contain the right value (including the right Port)

How do I change the default password of MySQL root user on Cloudbees?

We are running Jenkins on Cloudbees for building our code base from Github repo for MifosX. For our Integration Test job, we need to create a MySQL DB before each run. We have been able to do that, but would like to change the default MySQL credentials which are "root" and blank password, to some specific "password". Can someone guide us on how to do that?
I assume you are following this guide.
If that's the case, you should be able to follow standard MySQL instructions for setting the root users' password:
mysqladmin -u root password NEWPASSWORD
But I'm not sure why you would want to secure this with a password. Any network ports are isolated from other users, and they certainly don't have access to your files.

how to run jenkins as super user?

I am Mahesh.
I installed jenkins in my linux machine,IT works well as a normal user, When i try to run one script in super user [root] mode,It is not working properly,Even i disable the password in sudoers file it is not working and also It not giving any error It just running the script in normal user instead of root ?? what i do? how i can resolve this problem ??
I just add like this in shell script coloumn in jenkins...
sudo su //comment-->I disable the password so no password required ,I tested in the terminal and am able to enter into root without password with this
sh something.sh
I would advise against running Jenkins (or any application server) as the root user.
Instead of battling the sudo command, why not install the Jenkins ssh plugin and configure the jenkins user to perform an ssh login to the root account?