1Password on Mastodon

Git and 1Password interaction doesn't work with "git clone" on a regular terminal

Community Member

When I'm in a git directory, cloned from GitHub, and I use a git command all seems to work well:

  • I insert a command (e.g. git fetch);
  • "System" ask for my fingerprint;
  • I insert my fingerprint ad all work wonderfully.

Now, once I have put for the first time my fingerprint, every time I insert a new git command all work without asking me for the fingerprint.

Now strange things happen:
-If I carry out all the steps described above on a standard terminal (for example gnome-terminal, or kgx), when I use the "git clone" command, perhaps to copy another of my private repositories, I will be asked for Username and Password Github.

-If, on the other hand, all the steps described above are performed on a terminal provided by "VisualStudio Code" then the "git clone" command, executed on the "VS Code" terminal, will work perfectly like any other command (git fetch, git pull,.. .) without asking me for a username and password.

Why this difference in behaviors?

Why does a "regular" terminal fail to hook up to 1password when I use "git clone"?

If the "git clone" command specifies "[email protected]:XXX" instead of "https://github.com/XXX" then you will be able to "connect" with 1password and everything will work correctly.

1Password Version: 8.9.10
Extension Version: Not Provided
OS Version: Fedora 37
Browser:_ Not Provided
Referrer: forum-search:Git and 1Password


  • Jack.P_1PJack.P_1P

    Team Member

    Hi @adriadri:

    Just to confirm, when you're using Visual Studio Code, are you using a HTTPS or a SSH remote for your Git repository?

    You can check using git remote -v.

    1Password SSH agent only works with SSH connections, so if you're using a HTTPS remote, Git won't use your SSH keys provided by 1Password. Let me know!


  • adriadriadriadri
    Community Member
    edited January 5

    In VS code if I insert your command I get that I'm using SSH.

    Anyway, when I say to use the "git clone" command without problems, I was implying that the value passed to "git clone" was an HTTPS link.

    Example on standard terminal:

    INPUT: git clone https://github.com/Username/repository
    Clone in 'XYZ123' ..
    Username for 'https://github.com':

    Example on VS Code terminal:

    INPUT: git clone https://github.com/Username/repository
    Clone in 'XYZ123' ..

  • jody.h_1Pjody.h_1P

    Team Member

    Hi @adriadri - I'm not entirely sure why you'd be experiencing the difference in behaviour, but as Jack mentioned 1Password's SSH Agent only works with SSH Keys, not HTTPS credentials, so if you stick to SSH remotes you (hopefully) shouldn't encounter this. It's also worth noting that VS Code is a verified compatible SSH client, so other applications may have differing behaviours and levels of support.

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file