You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update README to clarify the use of elastic user password environment variable (#128045)
- Added instructions for exporting the `ES_LOCAL_PASSWORD` environment variable.
- Updated the `curl` example and Python client example to use `ES_LOCAL_PASSWORD` for consistency.
To use the password for the `elastic` user, set and export the `ES_LOCAL_PASSWORD` environment variable. For example:
102
+
103
+
[source,sh]
104
+
----
105
+
source .env
106
+
export ES_LOCAL_PASSWORD
107
+
----
108
+
100
109
// NOTCONSOLE
101
110
102
111
=== Send requests to Elasticsearch
@@ -112,22 +121,23 @@ Here's an example curl command to create a new Elasticsearch index, using basic
112
121
113
122
[source,sh]
114
123
----
115
-
curl -u elastic:$ELASTIC_PASSWORD \
124
+
curl -u elastic:$ES_LOCAL_PASSWORD \
116
125
-X PUT \
117
126
http://localhost:9200/my-new-index \
118
127
-H 'Content-Type: application/json'
119
128
----
129
+
120
130
// NOTCONSOLE
121
131
122
132
==== Using a language client
123
133
124
-
To connect to your local dev Elasticsearch cluster with a language client, you can use basic authentication with the `elastic` username and the password you set in the environment variable.
134
+
To connect to your local dev Elasticsearch cluster with a language client, you can use basic authentication with the `elastic` username and the password stored in the `ES_LOCAL_PASSWORD` environment variable.
0 commit comments