Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use credential callback to set credentials #14889

Merged
merged 2 commits into from
Apr 17, 2018

Conversation

mkanoor
Copy link
Contributor

@mkanoor mkanoor commented Apr 25, 2017

https://bugzilla.redhat.com/show_bug.cgi?id=1443106
https://bugzilla.redhat.com/show_bug.cgi?id=1552274

Rugged works using callbacks for credentials. The callback can be either a credential object or a callback that returns a credential object. If the credentials are invalid the callback is called again, it is designed to be used in a UI, where the UI can prompt the user for entering the updated userid/password. If the user doesn't want to enter the userid/password they can cancel it.

Since the callback is being called repeatedly it gives the feeling that the UI is stuck or the rake import command is stuck.

We record that the credential has been set once in the callback and if called again it raises an exception which rugged sends back to the caller.

Links

@mkanoor
Copy link
Contributor Author

mkanoor commented Apr 25, 2017

@gmcculloug @Fryguy @eclarizio
Please review

@chessbyte
Copy link
Member

@gmcculloug bump

Copy link
Member

@eclarizio eclarizio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any way we can add specs for the methods that were changed in lib/git_worktree.rb? The larger amount of changes in that file worry me more without specs.

@miq-bot
Copy link
Member

miq-bot commented Jan 3, 2018

This pull request has been automatically closed because it has not been updated for at least 6 months.

Feel free to reopen this pull request if these changes are still valid.

Thank you for all your contributions!

@miq-bot
Copy link
Member

miq-bot commented Apr 13, 2018

This pull request is not mergeable. Please rebase and repush.

@miq-bot
Copy link
Member

miq-bot commented Apr 16, 2018

Checked commits mkanoor/manageiq@115f021~...4928e89 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0
5 files checked, 0 offenses detected
Everything looks fine. 🍪

@mkanoor
Copy link
Contributor Author

mkanoor commented Apr 16, 2018

@gmcculloug Please review

@gmcculloug gmcculloug merged commit 2dd64f8 into ManageIQ:master Apr 17, 2018
@gmcculloug gmcculloug added this to the Sprint 84 Ending Apr 23, 2018 milestone Apr 17, 2018
simaishi pushed a commit that referenced this pull request Apr 17, 2018
@simaishi
Copy link
Contributor

Gaprindashvili backport details:

$ git log -1
commit d494db96eefc9cbfa041f8e58032b7f49d8eb5d2
Author: Greg McCullough <gmccullo@redhat.com>
Date:   Tue Apr 17 08:49:19 2018 -0400

    Merge pull request #14889 from mkanoor/bad_credentials
    
    Use credential callback to set credentials
    (cherry picked from commit 2dd64f87eadf69294a4706a4082bc08d6c9bbb11)
    
    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1568602
    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1568604

@simaishi
Copy link
Contributor

Fine backport details:

$ git log -1
commit 6835b92505cf00a6185e5536366693b2351f6a09
Author: Greg McCullough <gmccullo@redhat.com>
Date:   Tue Apr 17 08:49:19 2018 -0400

    Merge pull request #14889 from mkanoor/bad_credentials
    
    Use credential callback to set credentials
    (cherry picked from commit 2dd64f87eadf69294a4706a4082bc08d6c9bbb11)
    
    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1568603
    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1568605

d-m-u pushed a commit to d-m-u/manageiq that referenced this pull request Jun 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants