Drools Workbench accessing Repository via SSH - ssh

We installed KIE WB 6.1.0 on a Tomcat 7 server on Windows 2012 and created some users. Those users can log in to the Workbench and work on and in the repository.
If I try to clone that repository from another computer, I only get authentication errors:
mb-itmsan01:temp ds$ git clone ssh://admin#192.168.150.34:8001/TestRep
Cloning into 'TestRep'...
Password authentication
Password:
Password authentication
Password:
Password authentication
Password:
admin#192.168.150.34's password:
Permission denied, please try again.
admin#192.168.150.34's password:
Permission denied, please try again.
admin#192.168.150.34's password:
Permission denied (password,keyboard-interactive).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
I am sure that the user and password combination is correct ...
Am I missing something, e.g. a role for the user or some configuration? I added all roles which are described in the manual for that user, still no success.

I found out how to fix this problem:
It has been fixed in 6.2.x (currently only available in Beta status). If you want to fix the problem in Drools WB 6.1.x on Tomcat 7, just replace the content in the file WEB-INF/classes/login.config with the following content:
ApplicationRealm {
org.apache.catalina.realm.JAASMemoryLoginModule REQUIRED debug=true;
};
The respective commit on github is:
https://github.com/droolsjbpm/kie-wb-distributions/commit/e53c0c36686822fc17ad5e8aceab39f1de4fb844
After that one can access the Git repository via SSH with the credentials defined in tomcat-users.xml.

Related

Unable to Paste a PAT from GitHub to Cloud9 Ruby on Rails

I am trying to paste a Personal Access Token that I created in GitHub into the command line of a Ruby on Rails program I'm developing on Cloud9. I put in my GitHub username, and when I try to put in the PAT under password, it won't paste. I've tried with 2 different apps, but can't complete the git push. As a result I can't deploy my app to production.
I'm new at RnR, so have been learning using https://www.railstutorial.org/ following these instructions. I would appreciate any help I could get.
[website (main)]$ git remote add origin https://github.com/mhartl/hello_app.git
[website (main)]$ git branch -M main
[website (main)]$ git push -u origin main
After running the third command you will be prompted to enter your username and password. The username is simply your GitHub username, but the password is not your GitHub password; instead, the “password” must be a personal access token which you can create by following the instructions in the GitHub article “Creating a personal access token” I suggest selecting “No expiration” for the token expiration, and also be sure to select “repo” as the scope of the token so that it works at the command line. Once you’ve created and saved the personal access token, paste it in at the command line when prompted for a password to complete the git push
Check if it actually won't paste, meaning: when you paste a password, often it is not displayed at all: you get the impression the paste failed because nothing moved.
But do try, just after pasting, to click enter and the PAT should be taken into account, even if it remains "invisible".
Check also your git config --global credential.helper: a caching mechanism can help you not entering the PAT on each clone/push/pull operation.
At least, for instance, git config --global credential.helper "cache --timeout=86400"
You can see what is cached with:
printf "host=github.com\nprotocol=https"|git-credential-cache get
You can remove it with
printf "host=github.com\nprotocol=https\nusername=you"|git-credential-cache erase
You can store the new PAT with
printf "host=github.com\nprotocol=https\nusername=you\npassword=yourPAT"|git-credential-cache store

Logon failed, use Ctrl + C to cancel basic credential prompt

I'm facing problems while trying to pull/push my code into a GitHub repository using the cmd prompt for the last two days. How can I resolve this issue?
Logon failed, use Ctrl + C to cancel basic credential prompt. Username for 'https://github.com': satyendrasingh8 Password for 'https://satyendrasingh8#github.com': remote: Invalid username or password. fatal: Authentication failed for 'https://github.com/satyendrasingh8/chatApp.git/'
Fitz_Hoo is right! I just wanted to give a more detailed explanation that fix my issue. Essentially GitHub deprecated their password authentication recently (you can read more by clicking here).
Now instead of adding your username/email and password, you will login with your browser. The image below is the new interface. As Fitz_hoo mentions, you must update your Git to see the new changes!
If you are using Windows, you can simply use this command below to update your Git:
git update-git-for-windows
I fixed the problem just simply by upgrading my client Git Bash to the latest version!
When I encountered the problem, I received an email from a GitHub official, who told me the reason was mainly the Git version was incompatible:
GitHub has changed how users authenticate when using Git for Windows, and now requires the use of a web browser to authenticate to GitHub. To be able to login via web browser, users need to update to the latest version of Git for Windows. You can download the latest version at:
https://gitforwindows.org/
One reason for this message could be that the remote branch you were trying to pull was already deleted.
Delete the GitHub entry from Credential Manager: Control Panel → User Accounts → Credential Manager.
Then push the code again.
For me, the problem was that instead of my username I was trying to login with my email.
I received an email from GitHub telling me
We recently updated the format of our API authentication tokens,
providing additional security benefits to all our customers. In order
to benefit from this new format, please regenerate your personal
access token
I regenerated my personal access token (PAT) and was then unable to log in from command line on Windows 10 when I tried something like git pull.
A window would pop up, inviting me to enter 'username or email' and password. I tried various combinations, using the PAT, as mentioned in the GitHub documentation, and the actual password, but every time I received:
Logon failed, use ctrl+c to cancel basic credential prompt
Thanks to the answers from Fitz_Hoo and ousecTic, I updated my Git install with the command provided by ousecTic, and the authentication process was then completely different.
You can opt to use a PAT, but when you paste it in, no characters at all are shown, so just hit Enter.
In my case, I had this issue in relation to the federated authentication to AWS CodeCommit. The fix was to upgrade git to +v2.30.z (i.e. 2.35.3) and disable interactive prompt (docs):
git config --global credential.interactive false
A global configuration in ~/.gitconfig would look like:
[credential]
interactive = false
A AWS CodeCommit specific configuration, would look like (in ~/.gitconfig):
[credential "https://git-codecommit.us-east-1.amazonaws.com"]
interactive = false
here is the solution which works for me, uninstall Git from Machine after that install new version of it and sign in via web

How to solve My SQL ERROR 1045 (28000): Access denied for user 'root'#'localhost' (using password: YES)

I know there are already similar questions and I tried each of the solutions but somehow nothing seems to help. Maybe anyone has an idea what is going on. I am very new to the programming world and don't understand yet what's behind all the commands, but tried my best to solve it myself.
I installed MySQL via homebrew on a mac. As long as the password was not set up and I could just press enter when asked for password all was fine. Then I changed the password via this command
mysql> ALTER USER 'root'#'localhost' IDENTIFIED BY '';
After doing this, I could not log in any more and always get the ERROR 1045 (28000). I reinstalled SQL and also downloaded another version via Then I installed SQL via the MySQL community server, but this also did not change anything.
But by installing via MySQL community I could go to the system preferences and reset the password (which also did not work via the terminal) - but again no luck.
I would appreciate any ideas. Thanks.
The issue is likely due to socket authentication being enabled for the root user by default when no password is set, during the upgrade to ubuntu 16.04.
The solution is to revert back to native password authentication. You can do this by logging in to MySQL using socket authentication by doing:
sudo mysql -u root
Once logged in:
ALTER USER 'root'#'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
which will revert back to the native (old default) password authentication.
Now use password as the password whenever required by MySQL.

How to force TortoiseSVN client 1.11.1 on Win10 to prompt for credentials (disable automatic LDAP authentication)?

I've just installed latest TortoiseSVN client on Win 10 Pro v1803 b17134.556
I've done pretty much default installation, with possible only alteration that I wanted also CLI client. So it's in MS Win 10 default path: C:\ProgramData\Microsoft\Windows\Start Menu\Programs\TortoiseSVN
1.11.1, Build 28492 - 64 Bit , 2019/01/08 21:40:39
ipv6 enabled
Subversion 1.11.1, -release
apr 1.6.5
apr-util 1.6.1
serf 1.3.9
OpenSSL 1.1.0j 20 Nov 2018
zlib 1.2.11
SQLite 3.23.1
And obviously tried to browse and checkout an SVN repository.
A colleague of mine has TortoiseSVN client v1.9.5.xxx and he can browse our SVN server "nzchch-svn-yyy.xxxxxx.zzzzz.net/svn/MGIS without any issues. He can't remember how he managed to authenticate himself a long time ago, but he doesn't need to authenticated (I mean provide credentials) these days.
However I would expect kind of authentication dialog to pop up for me. Instead of it I'm getting only:
Unable to connect to a repository at URL
'https://..........net/svn/MGIS
Access to '/svn/MGIS' forbidden
I'm not sure if it is authenticated against LDAP, but even though if it does and my LDAP account doesn't have permission to access it (which I think is the case), I do have available a service account we use on Jenkins server to checkout the SVN repo, and I should be able to provide those credentials somehow. But Tortoise doesn't ask me for the credentials at all.
I tried to authenticate via CMD, running:
svn auth --username jenkinsuser --password topsecret
Credentials cache in 'C:\Users\bfu\AppData\Roaming\Subversion' is empty
I tried to follow several advices like:
remove auth dir:
rmdir /S %APPDATA%\subversion\auth\%APPDATA%\subversion\auth
Clearing 'All my Saved Data', well as it is a clean install I have enabled on to Clear: URL history and Dialog Sizes and positions.
Updating the config file to enable:
password-stores = windows-cryptoapi
store-passwords = yes
store-auth-creds = yes
which was commented out.
Just no way I can provide credentials and if it comes down, I can use hundreds of SVN servers with different authentication data and no way to enable it or force it to ask me for it.
Any idea what is going on? I'm pretty hopeless as I couldn't imagine there would be a such stubborn SVN client which would refused to ask me for credentials (and possibly save it in the next step).
The problem is not with authentication, but with authorization. Your user account does not have permissions to access MGIS repository. You need to review and fix your permissions.
Read https://www.visualsvn.com/server/getting-started/#User-Permissions.

How to save subversion password with bzr-svn

I am using bzr-svn to chekout svn repositories using bazaar. But bzr-svn asks for passwords everytime, I searched the web to find out about authentication.conf
I put the following section authentication.conf
[something]
scheme=svn+http #tried http only or svn only
host=uuuuuu.com
path=/svn/project #tried without stating path
user=wwwww
password='mmmmmm' #tried without quotes
In all cases either I was prompted for password, or got the following error
bzr: ERROR: Permission denied: ".": OPTIONS of 'http://xxxxxxxxx/': authorization failed: Could not authenticate to server: rejected Basic challenge (http://gamernetwork.unfuddle.com)
I put the same snippet in bazaar.conf and subversion.conf, but I got the same results/errors.
How can I use bzr-svn without typing my password each and every time?
I learned from #bzr IRC channel that bzr-svn can use cached authentication info of regular subversion client.
You just have to checkout the project once with svn, saving the user name and password. After that, bzr svn can use this password.