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
Copy file name to clipboardExpand all lines: README.md
+9-12Lines changed: 9 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,8 +37,8 @@ Example Applications
37
37
-[`StorageExample`](https://github.com/GoogleCloudPlatform/gcloud-java/blob/master/gcloud-java-examples/src/main/java/com/google/gcloud/examples/StorageExample.java) - A simple command line interface providing some of Cloud Storage's functionality
38
38
- Read more about using this application on the [`gcloud-java-examples` docs page](http://googlecloudplatform.github.io/gcloud-java/apidocs/?com/google/gcloud/examples/StorageExample.html).
39
39
40
-
Specifying a Project
41
-
--------------------
40
+
Specifying a Project ID
41
+
-----------------------
42
42
43
43
Most `gcloud-java` libraries require a project ID. There are multiple ways to specify this project ID.
44
44
@@ -49,11 +49,7 @@ Most `gcloud-java` libraries require a project ID. There are multiple ways to s
* Specify the environment variable `GCLOUD_PROJECT`. For example, type the following into command line:
53
-
54
-
```bash
55
-
export GCLOUD_PROJECT=PROJECT_ID
56
-
```
52
+
* Specify the environment variable `GCLOUD_PROJECT` to be your desired project ID.
57
53
* Set the project ID using the [Google Cloud SDK](https://cloud.google.com/sdk/?hl=en). To use the SDK, [download the SDK](https://cloud.google.com/sdk/?hl=en) if you haven't already, and set the project ID from the command line. For example:
58
54
59
55
```
@@ -62,10 +58,11 @@ Most `gcloud-java` libraries require a project ID. There are multiple ways to s
62
58
63
59
`gcloud-java` determines the project ID from the following sources in the listed order, stopping once it finds a value:
64
60
65
-
1. Project ID supplied when building the service options.
66
-
2. Project ID specified by the environment variable `GCLOUD_PROJECT`.
67
-
3. Project ID used by App Engine.
68
-
4. Project ID specified in the Google Cloud SDK.
61
+
1. Project ID supplied when building the service options
62
+
2. Project ID specified by the environment variable `GCLOUD_PROJECT`
63
+
3. App Engine project ID
64
+
4. Compute Engine project ID
65
+
5. Google Cloud SDK project ID
69
66
70
67
Authentication
71
68
--------------
@@ -86,7 +83,7 @@ There are multiple ways to authenticate to use Google Cloud services.
86
83
.build()
87
84
.service();
88
85
```
89
-
* If running locally fordevelopment/testing, you can use use Google Cloud SDK. Download the SDK if you haven't already, then login using the SDK (`gcloud auth login`incommand line). Be sure your current project is setcorrectly by running `gcloud config set project PROJECT_ID`.
86
+
* If running locally fordevelopment/testing, you can use use Google Cloud SDK. Download the SDK if you haven't already, then login using the SDK (`gcloud auth login`incommand line). Be sure to setyour project ID as described above.
90
87
91
88
`gcloud-java` looks forcredentialsin the following order, stopping once it finds credentials:
0 commit comments