Use the development credentials provider in development by default (#25273)

This PR changes the default credentials provider used in developments
builds of Zed to the development credentials provider.

Previously this required setting `ZED_DEVELOPMENT_AUTH=1` in order to
opt-in to the development credentials provider.

This led to confusion for new Zed employees who did not know that this
environment variable existed.

If you do need to interact with the system keychain for some reason, you
can run Zed with:

```
ZED_DEVELOPMENT_USE_KEYCHAIN=1
```

`ZED_DEVELOPMENT_AUTH` is dead. Long live Zed development auth!

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers
2025-02-20 19:07:16 +00:00
committed by GitHub
parent a8610fbd13
commit a1223e0646
5 changed files with 43 additions and 30 deletions
+19 -16
View File
@@ -10,30 +10,33 @@ If you'd like to develop collaboration features, additionally see:
- [Local Collaboration](./development/local-collaboration.md)
## Authentication
## Keychain access
When developing Zed you will typically want to sign in to the production collab
instance, unless you are specifically working on features that require running
collab locally.
Zed stores secrets in the system keychain.
In order to bypass the keychain prompts that pop up when trying to sign in each
time you run a development build of Zed, you can use the development auth
provider.
However, when running a development build of Zed on macOS (and perhaps other
platforms) trying to access the keychain results in a lot of keychain prompts
that require entering your password over and over.
This will store your Zed access token in a local file on disk that can be read
in development, bypassing the need to retrieve the credential from the system
keychain.
On macOS this is caused by the development build not having a stable identity.
Even if you choose the "Always Allow" option, the OS will still prompt you for
your password again the next time something changes in the binary.
To enable the development auth provider, set this in your shell:
This quickly becomes annoying and impedes development speed.
That is why, by default, when running a development build of Zed an alternative
credential provider is used in order to bypass the system keychain.
> Note: This is **only** the case for development builds. For all non-development
> release channels the system keychain is always used.
If you need to test something out using the real system keychain in a
development build, run Zed with the following environment variable set:
```
ZED_DEVELOPMENT_AUTH=1
ZED_DEVELOPMENT_USE_KEYCHAIN=1
```
You may want to add this to your shell profile so you don't need to remember to enable it each time.
> Note: This only works for development builds. It is a no-op in all non-development release channels.
## Contributor links
- [CONTRIBUTING.md](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md)