Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. # Google Cloud SDK Commands
  2.  
  3. ### Init
  4. Changes current project.
  5.  
  6. ```
  7. gcloud init
  8. ```
  9.  
  10. ### Compute Engine
  11.  
  12. **SSH**
  13. * Browser/Mobile Username: adam_elliot_fields
  14. * Windows Username: Adam
  15. * macOS Username: adamfields
  16.  
  17. *Stick to adam_elliot_fields to normalize across platforms*
  18.  
  19. ```
  20. instance-name === instance-1
  21. project-name === hello-world-171821
  22. zone-name === us-east1-b
  23.  
  24. gcloud compute ssh adam_elliot_fields@{instance-name} --project "{project-name}" --zone "{zone-name}"
  25. ```
  26.  
  27. ### Cloud Source
  28. * Creating a repository on the web console and attempting to push an existing Git repo did not work.
  29. * Use the command line to create a repo and then clone it.
  30. * Use automatic mirroring to mirror an existing GitHub repo.
  31.  
  32. **Create**
  33.  
  34. ```
  35. gcloud source repos create REPO_NAME
  36. ```
  37.  
  38. **Clone**
  39.  
  40. ```
  41. gcloud source repos clone REPO_NAME
  42. ```
  43.  
  44. **Push**
  45. Same as GitHub.
  46.  
  47. ```
  48. git push origin master
  49. ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement