zed icon indicating copy to clipboard operation
zed copied to clipboard

Sharing Git credentials with remote

Open lgeiger opened this issue 1 year ago • 3 comments

Check for existing issues

  • [X] Completed

Describe the feature

It would be great if Zed would automatically share git credentials with the remote.

For context, I'm primarily working with GitHub repos cloned via https and have the 2FA git credentials cached locally. This becomes slightly awkward when using Zed for remote development on remote machines which don't have these credentials setup.

When SSHing into remote machines via VSCode, it would automatically share the local git credentials with the remote machine which is very useful when working on several different remote machines.

Environment

Zed: v0.165.4 (Zed) OS: macOS 14.7.1 Memory: 16 GiB Architecture: aarch64

If applicable, add mockups / screenshots to help present your vision of the feature

No response

lgeiger avatar Dec 15 '24 20:12 lgeiger

  1. How are you currently handling credentials? Are you using SSH keys (ssh endpoints), GPG keys, GitHub CLI credentials or Git Credentials Manager or some mix?

If you are currently forwarding credentials via SSH, you're likely using agent forwarding which you can use with Zed too. Just add -A to your ssh command or specify your host under ~/.ssh/config and add AgentForwarding yes.

notpeter avatar Dec 16 '24 01:12 notpeter

Thanks for the super fast reply!

I'm currently authenticated using GitHub CLI credentials although I used Git Credentials Manager in the past as well. In both cases I the repos are cloned via https and not via ssh.

Thanks for the reminder regarding SSH credential forwarding, I might need to go back to SSH keys for now. However, my guess would be that many people are interacting with GitHub using https nowadays since their docs list it as the recommended method.

lgeiger avatar Dec 16 '24 01:12 lgeiger

Let me know if there is any additional info that I can share or if there is anything else I could help with. This would be a huge quality of live improvement for my workflow.

lgeiger avatar May 13 '25 16:05 lgeiger