Skip to content

git-bug push/pull: Error: knownhosts: illegal base64 data at input byte 0 #1485

Open

Description

@andreasabel

I am encountering Error: knownhosts: illegal base64 data at input byte 0 when doing a git-bug push or pull.
The reason seems to be that my known_hosts contains old entries in a format that is no longer parsed by whatever known-hosts parser git-bug uses.
However, this is the first time that any tool has complained about my known_hosts, I have never seen this error before.

Example for an entry in an old format:

marla 1024 35 143272250049166269737933547513323306924766577123720650722107527190659497169427080068806092731824033696458717398748610005261225355371083583221684382067690973456312131412664967323591000249395847872463401148460758167467249589130631631765553643486839666676377810040253889511108563175629631040770556919699102015121

Deleting all entries in this decimal format (as opposed to base64) fixes the problem.

I don't know if this is worth fixing; however, the error isn't very clear.
I am also a bit surprised why a tool like git-bug needs its own parser for known-hosts, isn't such abstracted in some kind of OS layer? (E.g. git does not have a problem with my known_hosts.)

Activity

  1. sudoforge commented on Sep 3, 2025

    @sudoforge
    Contributor

    we do not use a custom parser; we use go-git under the hood, which, unfortunately, i'm going to refer to as half-baked as it fails to support various things that you'd expect (e.g. the full configuration chain by default, includes and conditional includes, ssh and other protocol support, etc).

    critically, the issue you're running into shouldn't happen when you push to or pull from a bridge (because this uses your API credentials). the issue lies within the normal git-bug-push and git-bug-pull commands.

    this will be fixed in a future release, likely by reverting the decision to move to go-git for operations that interact with git remotes (which was done for security concerns to shelling out to git on the host machine).

    because git-bug creates normal git objects, you can push and pull to the git remote using git. see #1332 for more information.

  2. andreasabel commented on Sep 4, 2025

    @andreasabel
    Author

    Thanks for the quick triage!

    we do not use a custom parser; we use go-git under the hood, which, unfortunately, i'm going to refer to as half-baked as it fails to support various things that you'd expect (e.g. the full configuration chain by default, includes and conditional includes, ssh and other protocol support, etc).

    Yes, this is somewhat what I expected but did not formulate properly: using some other parser than git and the other OS tools...

    critically, the issue you're running into shouldn't happen when you push to or pull from a bridge (because this uses your API credentials). the issue lies within the normal git-bug-push and git-bug-pull commands.

    I can confirm this, no issue with the bridge commands, just the git-bug push/pull.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions