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

Authentication issues with Bitbucket #2915

Closed
jpfender opened this issue Feb 26, 2024 · 7 comments
Closed

Authentication issues with Bitbucket #2915

jpfender opened this issue Feb 26, 2024 · 7 comments
Labels
auth* Issues with authentication and authorisation, usually with forges bug Something isn't working feedback requested Feedback was requested to help resolve the issue

Comments

@jpfender
Copy link

Hey there,

First of all, thanks for creating this, it looks really promising and exciting.

I'm trying to get my hands dirty and push my first virtual branch to our company's Bitbucket, but I'm encountering an authentication issue.

The toast notification in GitButler states that the push failed with: Project remote authentication error.

In the logs, I can see the following:

2024-02-26T16:16:06.380009Z  INFO push_virtual_branch: gitbutler-app/src/virtual_branches/commands.rs:330: new project_id="dae4b093-bee9-41db-b9c7-70607a822329" branch_id="0fb5129e-719e-4f57-a631-8c6495148cb9" with_force=false
2024-02-26T16:16:07.540105Z  INFO push_virtual_branch: gitbutler-app/src/git/credentials.rs:41: authenticating with bitbucket.org:<my_company>/<my_repo>.git using key <my_key> project_id="dae4b093-bee9-41db-b9c7-70607a822329" branch_id="0fb5129e-719e-4f57-a631-8c6495148cb9" with_force=false
2024-02-26T16:16:07.540211Z  WARN push_virtual_branch: gitbutler-app/src/project_repository/repository.rs:390: git push failed project_id=dae4b093-bee9-41db-b9c7-70607a822329 error=Error { code: -16, klass: 23, message: "authentication required but no callback set" } project_id="dae4b093-bee9-41db-b9c7-70607a822329" branch_id="0fb5129e-719e-4f57-a631-8c6495148cb9" with_force=false
2024-02-26T16:16:07.540447Z  INFO push_virtual_branch: gitbutler-app/src/virtual_branches/commands.rs:330: close time.busy=1.16s time.idle=43.9µs project_id="dae4b093-bee9-41db-b9c7-70607a822329" branch_id="0fb5129e-719e-4f57-a631-8c6495148cb9" with_force=false

I have GitButler set up to explicitly use the ed25519 key I'm normally using to push to Bitbucket.

From the error message, is it certain that this is definitely an authentication issue? I know that our Bitbucket has some pre-receive hooks set up that can reject a push for a couple of reasons, such as not including a JIRA ticket ID in the commit message. I took care of that, but I don't know if there is maybe something else in the push from GitButler that BB might not like, such as the branch name.

Happy to provide as much information on our BB config as I can if necessary!

@Byron Byron added bug Something isn't working feedback requested Feedback was requested to help resolve the issue auth* Issues with authentication and authorisation, usually with forges labels Apr 22, 2024
@Byron
Copy link
Collaborator

Byron commented Apr 22, 2024

Thanks for reporting!

As of Version 0.11.3 (20240419.070253), there is a new way of pushing and fetching that just uses the Git binary.

Screenshot 2024-04-22 at 21 15 20

Is this something you could try out?

Maybe using the local SSH key also works now, but if not, the logs would probably provide the best insights into what happened. Thanks for your help.

@akshaybabloo
Copy link

@Byron Where is this setting located? Can't seem to find it user preferences or project settings on version 0.12.5

@Byron
Copy link
Collaborator

Byron commented Jun 25, 2024

Are you on Windows by any chance? I noticed that on Windows the menu might be hidden. Otherwise it should be the project settings.

If you are on Windows and it's actually not using the Git executable, then it might be some other issue that is maybe solved by manually editing the projects.json file for now.

@akshaybabloo
Copy link

akshaybabloo commented Jun 25, 2024

Yes, I am on Windows. Is there a git path or a setting for that I have to do? Is there like a "use_git_executable": true thing?

This is what I see

[
  {
    "id": "5b6d547b-1090-4fc9-b174-7149584c2229",
    "title": "<project nam>",
    "description": null,
    "path": "<path>",
    "preferred_key": "systemExecutable",
    "ok_with_force_push": true,
    "api": null,
    "gitbutler_data_last_fetch": null,
    "gitbutler_code_push_state": null,
    "project_data_last_fetch": {
      "fetched": {
        "timestamp": {
          "secs_since_epoch": 1719271865,
          "nanos_since_epoch": 835546400
        }
      }
    },
    "omit_certificate_check": null,
    "snapshot_lines_threshold": null,
    "use_new_locking": false
  }
]

Opened a ticket for it #4170

@Byron
Copy link
Collaborator

Byron commented Jun 25, 2024

Indeed, it's already set to the correct value, so I'd expect it to try and use the Git executable.

Maybe it falls back to trying with git2, hence the original log message.

Maybe you could try the nightly version, as it will try harder to find the Git executable in default installation locations. And even if that doesn't work, I'd expect the output in the logs to reveal what's happening more clearly.

@krlvi
Copy link
Member

krlvi commented Aug 16, 2024

Hey @jpfender - is this still an issue that you are experiencing? Did you originally experience this under Windows?

@krlvi
Copy link
Member

krlvi commented Sep 10, 2024

Closing this one since we havent heard back from the author. Feel free to create a new issue if this is still an issue. Thank you.

@krlvi krlvi closed this as completed Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auth* Issues with authentication and authorisation, usually with forges bug Something isn't working feedback requested Feedback was requested to help resolve the issue
Projects
None yet
Development

No branches or pull requests

4 participants