GitHub pull request builder unable to connect to GitHub - jenkins

Good afternoon.
I'm using plugin version 1.42.0.
Recently I receive a token deprecation notice in my mailbox. I regenerated the token and now I'm not able to connect to Github at all through this plugin.
I tried different types of credentials - email + password, secret text, email + password (where the token is the password), no luck.
Please note that credentials are valid, I'm able to connect to GitHub through other plugins.
Am I missing something very obvious here?
PS. No 2-factor auth is enabled for my account.
I'm not an admin account, but I'm able to read and write everything into the repo.

Well, my bad.
I was so tired, that I did not put a repository name into the field above.
Everything is working now.

Related

Rails credentials only remembering old credentials?

Issue: I created a new Stripe account and connected it to my application, did all the new test publishing and secret api keys... Added to my credentials and config.
All of my keys are successfully called with :
Rails.application.credentials.dig(:stripe, :publishable_key),
...in both config and stripe.js file
I update my keys in credentials and make a test payment and get
No such token: tok_1EKxxxxxxxxxxxhQKy
I then manually put in the new publishable key in the stripe.js file, and it works...
To test, I tried entering the old test key, and i get the same errors. So i am assuming the credentials dig is getting my old keys because its the same error?
Is it possible the credentials is somehow not updating?
Now, one issue i can think of is, in the past i used atom to update my credentials, and it never worked. I recently came across a post hat atom doesn't work with credentials but nano does. So i implemented this and it worked (up until i entered new keys in). So i am wondering if my old inputs into the old atom credentials could be interfering? I doubt it but might be worth mentioning
What could be done to fix this as i want to implement using credentials?
All of the keys are test keys and in their right places.
I'm assuming, in the stripe.js file, the credentials or the dig is only fetching the old key?
Because when i manually put in the old test key, it doesn't work with same error as the credentials dig.
This was all working fine until i updated the credentials for the new keys...
Spring cached credentials file.
Run this command:
spring stop

Unable to Authenticate my Bitbucket server account with Sourcetree / How to register in source tree with Bitbucket Server credentials

I have a Bitbucket repository, which I'm able to logging in web browser with my credentials, Now I want to checkout it in Sourcetree, So I've installed Sourcetree 2.6.10, It requires authentication to Bitbucket server with Root URL & Username to continue, I'm providing input in below format...
Root URL : https://bitbucket.xxxxxxx.com
Username : xxxxxx.xxxxxx
The error i'm getting is...
Failed to check login for user [xxxxx.xxxxxx]. You do not have permission to access URL ‘https://bitbucket.xxxxxxxxx.com/rest/api/1.0/users/xxxxxx.xxxxxx’ please check the user credentials associated with this account. The request returned with status code ‘Unauthorized’.
Any help would be appreciated, thanks !
To fix:
1-go to source tree window, clicked remote
2-little gear icon, clicked "settings"
3-double clicked on Bitbucket server, changed protocol from default HTTPS to SSH
To Perforce, Now, I m sharing another solution whether if the user prefers, BitBucket Cloud intergrated with SourceTree,(facing the above stated issue),
Since one of the steps of the upgrade process was to input your Atlassian account password, you should now have a password set (in addition to being able to use Google). You should be able to use your Bitbucket username and Atlassian account password to authenticate SourceTree.
If you need to reset your Atlassian account password, you can do so here: https://id.atlassian.com/login/resetpassword
Source : https://community.atlassian.com/t5/Bitbucket-questions/Cannot-login-with-Bitbucket-in-SourceTree-after-linking-with/qaq-p/145231
I had a similar problem trying to register Sourcetree the first time I opened it, using my company's Bitbucket Server URL. Turns out I just needed to include https:// at the beginning of the URL.
Drop everything after ".com" and log in there.
e.g. log into
https://bitbucket.xxxxxxx.com
not
‘https://bitbucket.xxxxxxxxx.com/rest/api/1.0/users/xxxxxx.xxxxxx’
see also
https://jira.atlassian.com/browse/SRCTREEWIN-8743

Upsource with GitLab as Oauth

I'm running GitLab on local address http://192.168.0.18/. Upsource is running on http://192.168.0.11/.
I've added Upsource application as admin on GitLab. I've set client id and secret token as GitLab said. Authorization is set to http://192.168.0.18/oauth/authorize, token to http://192.168.0.18/oauth/token and user data to http://192.168.0.18/api/v4/user (according to GitLab documentation). In field mappings, I've set User ID to "id" and both e-mails to "email".
Then, on logging page of Upsource, I've oath authentication icon. After clicking on it, GitLab requires logging and user has to authorize application for its account:
Authorization required
Authorize Upsource to use your account?
You are an admin, which means granting access to Upsource will allow them to interact with GitLab as an admin as well. Proceed with caution.
This application will be able to:
Access your API
Read user information
Hovewer, after clicking authorize button, Upsource displays info: Authentication failed. Check your credentials and try again.. What have I set wrong? Field mappings?
Oh, I've found the answer. As happens often, I was fighting with this a good amount of hours and just after I asked this question, I've got idea to run this on my own. Rubber duck method, I guess...
As I suspected, the problem was in field mappings.
I looked in Network tab in Chrome and there was this response:
http://192.168.0.11/hub/auth/login?response_type=token&client_id=[CLIENT_ID]&redirect_uri=[REDIRECT_URI]&message=hub-auth-failed&developer_message=getValueByPath%28json%2C+aut%E2%80%A6userIdPath%29%21%21.textValue%28%29+must+not+be+null
I've manually went through all Gitlab workflow and then I could log in - and after running http://192.168.0.18/api/v4/user endpoint, I've got user data:
{"name":"username","username":"username","id":3,"state":"active","avatar_url":"http://www.gravatar.com/avatar/94232f2d1f8bb2fe940de439a4df1014?s=80&d=identicon","web_url":"http://debian/username","created_at":"2017-03-25T22:28:21.375Z","is_admin":true,"bio":null,"location":null,"skype":"","linkedin":"","twitter":"","website_url":"","organization":null,"last_sign_in_at":"2017-03-25T22:28:21.487Z","confirmed_at":"2017-03-25T22:28:21.376Z","email":"username#username.username","color_scheme_id":1,"projects_limit":100000,"current_sign_in_at":"2017-03-25T22:36:31.853Z","identities":[],"can_create_group":true,"can_create_project":true,"two_factor_enabled":false,"external":false}
The problem was in setting ID field name. As we can see in above JSON data, id field should be mapped to name/username, not id itself.
After this change I could sucessfully login into Upsource.

Bad Authentication Error Rails connecting to google drive

I have a contacts controller which has a method to connect and save the data submitted from the form to a spreadsheet in my account on google drive (app/models/contact.rb):
def update_spreadsheet
connection = GoogleDrive.login(ENV["GMAIL_USERNAME"], ENV["GMAIL_PASSWORD"])
ss = connection.spreadsheet_by_title('Learn-Rails02-Example')
if ss.nil?
ss = connection.create_spreadsheet('Learn-Rails02-Example')
end
The method calls on environment variables I set up with figaro which are saved config/environments/development.rb as follows:
GMAIL_USERNAME: tgolsby#gmail.com
GMAIL_PASSWORD: Paxxword (obviously this is a place holder for my actual password in the .yml file)
When I submit my form I get the following error:
*GoogleDrive::AuthenticationError at /contacts
Authentication failed for tgolsby: Response code 403 for post https://www.google.com/accounts/ClientLogin: Error=BadAuthentication*
It points to the following line in the contacts model:
*def update_spreadsheet*
**connection = GoogleDrive.login(ENV["GMAIL_USERNAME"], ENV["GMAIL_PASSWORD"])**
*ss = connection.spreadsheet_by_title('Learn-Rails02-Example')
if ss.nil?
ss = connection.create_spreadsheet('Learn-Rails02-Example')
end*
I have checked and rechecked my username and password and am 100% sure they are correct in the application.yml file. I have gone through the tutorial and repeated all the steps but I just cant' figure out why the app is having trouble connecting to google. I have also checked that I don't have 2 step verification set up on my google account.
You might have the same issue I had. I was accessing my google doc using the google_drive gem on a personal project I had not touched in over a year. I used to be able to access my google doc by enabling a session using session = GoogleDrive.login('rosalyntest1#gmail.com', 'password') but was now getting the same error as you.
I logged into that account using my password and saw an email from google with a subject of "sign in blocked." I followed the link https://www.google.com/settings/security/lesssecureapps to enable less secure app access for that account only and was able to enable a session locally using the same code. I would check your google account and see if you received an email or enable less secure app access and try again.
The code is good (you can check it against the learn-rails example application). It looks exactly like the code from the Learn Ruby on Rails book.
That means the problem is a result of an environment or configuration issue.
First, are you running locally, or do you have the problems after deploying to Heroku?
If running locally, here are things you can try to troubleshoot:
1) Try restarting the web server. When you change configuration files, the server has to be restarted.
2) Replace ENV["..."] in the code and use the credentials directly ("hardcode the credentials"). Be careful not to check the code into the git repo with the hardcoded credentials (and don't push to GitHub because you would expose your credentials).
3) Can you send email from the application? Comment out the code that updates the spreadsheet and you should be able to send email if your credentials are correct.
I had this problem as well, and I was able to fix it by making the ENV["GMAIL_PASSWORD"] code in my contacts model all caps just as it is in my environment. It was not working when I only had the first letter caps in the code but everything in caps in the env variable, so be sure to consider the case sensitivity of your environments.

Why emails are not sending on production server?

I'm using the grails plugin "mail=0.9". Emails are not sending on production server. It just works fine on development environment on localhost.
Error is given below;
Stacktrace follows:
javax.mail.AuthenticationFailedException
at javax.mail.Service.connect(Service.java:319)
at org.grails.mail.MailService.sendMail(MailService.groovy:63)
at org.grails.mail.MailService.sendMail(MailService.groovy:46)
at org.grails.mail.MailService$sendMail.call(Unknown Source)
at MailGrailsPlugin$_configureSendMail_closure4.doCall(MailGrailsPlugin.groovy:86)
at com.tkxel.chefvivant.api.SommelierController$_closure4.doCall(SommelierController.groovy:107)
at com.tkxel.chefvivant.api.SommelierController$_closure4.doCall(SommelierController.groovy)
at java.lang.Thread.run(Thread.java:636)
Can anyone help me? Why emails are not sending?
Thanks
Finally, after being spending the much time on this issue. I have fixed this error.
Actually the problem was just about to set the Gmail account settings. Google was sending the hidden captcha and that's obvious machine cannot recognize it. So that's why I was getting authentication error.
Solution:
I just unlocked the Gmail captcha and now it works fine.
Steps to reproduce this
1. Logout your gmail account first.
2. Visit this url https://accounts.google.com/DisplayUnlockCaptcha and then put username and password to login
3. Press "Continue" button to unlock the captcha
4. It will automatically save the settings.
Now, Check your application to hit the url like "Forgot Password" request. You will must receive email. :)
You can also read this article.
http://productforums.google.com/forum/#!topic/gmail/uBdBQAuGeTw
Thanks
javax.mail.AuthenticationFailedException means that you are useing incorrect credentials to access to account you use to send emails.

Resources