Tag Archives: Authentication failed

How to Solve MongoDB Error: Authentication failed.

Question:

Implementation db.auth (‘username ‘,’ password ‘),
monodb authentication failed,
error: authentication failed.  appears

environment

Root, admin, and business database user authentication failed

Solution

    1. stop mongodb and open it without authentication,
##Go to the bin directory
cd 
##stop
mongod --shutdown --dbpath=/soft/mongo/mgserver/data/
##start
./mongod --dbpath=/soft/mongo/mgserver/data/ --logpath=/soft/mongo/mgserver/logs/mongod.log --logappend --port=27017 --fork

verify

mongo
show dbs

use  ${your db}
show users

use admin
show users

Modify password
3.1 modify root password:

#
mongo
#
db.changeUserPassword('root','${new  password}')
#
exit

#closed
mongod --shutdown --dbpath=/soft/mongo/mgserver/data/
#Certification Launch
./mongod --dbpath=/soft/mongo/mgserver/data/ --logpath=/soft/mongo/mgserver/logs/mongod.log --auth --logappend --port=27017 --fork

#
mongo
#
use admin
#user, pwd
db.auth('','')

Similarly, change the password of other users

3.2 new users

#
mongo
#
use ${your db}
#
db.createUser({
	user: "",
	pwd:"",
	roles:[{role:"readWrite",db:""}]
})

AS Pycharm Git push Error: Invocation failed Server returned invalid Response, Authentication failed

Contents of articles

Android studio git error reporting and Solutions

Pcharm git push error and solution push failed: unable to access’ https://github.com/BierOne/bottom-up-attention-vqa.git/ ‘: Could not resolve host: github.comPush failed Invocation failed Server returned invalid Response. Authentication failed for

Reference link

Android studio git error reporting and Solutions

after all, Android studio and pychar are the same family. However, there are many solutions to as found on the Internet. Here is a brief introduction</ mark>

Invocation failed Unexpected Response from Server: Unauthorized

resolvent:

AndroidStudio -> Preferences -> Git -> SSH Executable and changed from Native to Built-in and it started working.

Reason: SSH key pair protects the password. If you select native SSH executable, the as will not prompt you to enter the password, so the final authentication will fail. However, if build in is set, you will be prompted to enter the password, so the authentication is successful.

Pychar git push error report and solution

Push failed: Unable to access ‘ https://github.com/BierOne/bottom-up-attention-vqa.git/ ’: Could not resolve host: github.com

Solutions and reasons:

This error is obviously caused by network problems. It is recommended to connect to the network again. Generally, the avatar can be displayed normally at this position, that is, there is no problem with the network

Push failed Invocation failed Server returned invalid Response. Authentication failed for

Solution and reason: because there is no build in option in my pychar, the as method is not applicable. My solution is to check “use confidential helper” in the GIT column, which is the authentication assistant:

in this way, you will be prompted to enter your password during authentication, and you can pass the authentication normally. There are other solutions, but they are similar.

In addition, you can also try to use token when adding GitHub account. It should be done once and for all

In the settings page of the GitHub official website account, select create new token, and then copy it