Alias setup in Cloud Shell

295 views
Skip to first unread message

Anthony Cosentino

unread,
Oct 10, 2019, 2:50:50 PM10/10/19
to GAM for G Suite
I have installed the latest version of GAM in GCP and uploaded my client_secrets.json,oauth2service.json, and oauth2.txt files into my cloud shell home directory. I can't find this .bashrc file in order to setup the alias portion. Can someone please let me know how to add this file and then update it. 

2019-10-10 14_47_32-Cloud Shell.png


Thanks,
Anthony

Kevin Melillo ✉

unread,
Oct 10, 2019, 2:55:02 PM10/10/19
to google-ap...@googlegroups.com
You will need to use the File\Open command.  When you use this, it will show the hidden files.  You can also just use the command-line interface with an editor to open this file... for example
nano .bashrc


--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/9d6c1db0-d014-4587-9ca4-581b0d5da7fe%40googlegroups.com.


--
photo
Kevin Melillo
Electronic Communications Analyst, Information Technology

Phone: 732.465.6609 | Mobile: 732-609-4331

Email: k.me...@ieee.org

445 Hoes Lane Piscataway, NJ 08854

Anthony Cosentino

unread,
Oct 10, 2019, 3:03:31 PM10/10/19
to GAM for G Suite
Hey Kevin,

Thanks. I just started using Cloud Shell and really don't have much experience with it. I switched to wanting to use GAM in GCP because of the SSL Cert errors I keep getting when trying to use GAM on my Windows 10 laptop. I was able to find the .bashrc, but I have no idea what to do next. Any ideas?

Thanks man.


On Thursday, 10 October 2019 14:55:02 UTC-4, k.melillo wrote:
You will need to use the File\Open command.  When you use this, it will show the hidden files.  You can also just use the command-line interface with an editor to open this file... for example
nano .bashrc


On Thu, Oct 10, 2019 at 2:50 PM Anthony Cosentino <Anthony....@cogeco.com> wrote:
I have installed the latest version of GAM in GCP and uploaded my client_secrets.json,oauth2service.json, and oauth2.txt files into my cloud shell home directory. I can't find this .bashrc file in order to setup the alias portion. Can someone please let me know how to add this file and then update it. 

2019-10-10 14_47_32-Cloud Shell.png


Thanks,
Anthony

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.

Kevin Melillo ✉

unread,
Oct 10, 2019, 3:09:25 PM10/10/19
to google-ap...@googlegroups.com
My bash has this added for it to find and run GAM.  I run it in the provided free Cloud Shell.

gam() { "/home/k_melillo/bin/gam/gam" "$@" ; }

You will have to change the path to point to the GAM executable, but otherwise, it should run.

Note, after you make the change and save the file, re-run the .bashrc file, or close and reopen the shell.
~/.bashrc

On Thu, Oct 10, 2019 at 3:03 PM Anthony Cosentino <Anthony....@cogeco.com> wrote:
Hey Kevin,

Thanks. I just started using Cloud Shell and really don't have much experience with it. I switched to wanting to use GAM in GCP because of the SSL Cert errors I keep getting when trying to use GAM on my Windows 10 laptop. I was able to find the .bashrc, but I have no idea what to do next. Any ideas?

Thanks man.

On Thursday, 10 October 2019 14:55:02 UTC-4, k.melillo wrote:
You will need to use the File\Open command.  When you use this, it will show the hidden files.  You can also just use the command-line interface with an editor to open this file... for example
nano .bashrc


On Thu, Oct 10, 2019 at 2:50 PM Anthony Cosentino <Anthony....@cogeco.com> wrote:
I have installed the latest version of GAM in GCP and uploaded my client_secrets.json,oauth2service.json, and oauth2.txt files into my cloud shell home directory. I can't find this .bashrc file in order to setup the alias portion. Can someone please let me know how to add this file and then update it. 

2019-10-10 14_47_32-Cloud Shell.png


Thanks,
Anthony

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.


--
photo
Kevin Melillo
Electronic Communications Analyst, Information Technology

Phone: 732.465.6609 | Mobile: 732-609-4331

Email: k.me...@ieee.org

445 Hoes Lane Piscataway, NJ 08854

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/4e761951-ef8b-4925-90cf-726176d0e98d%40googlegroups.com.

Anthony Cosentino

unread,
Oct 10, 2019, 3:29:02 PM10/10/19
to GAM for G Suite
Hey Kevin,

Ya... so I have no idea what a BASH is and what it does. 

I've seen this in one of the posts: 
Set an appropriate alias in /home/username/.bash_aliases
Basic: alias gam=/home/username/bin/gam/gam

​But I still have no idea.

Sorry dude. I'm sure you're busy and don't need this hassle. All good.

Thanks,​

On Thursday, 10 October 2019 15:09:25 UTC-4, k.melillo wrote:
My bash has this added for it to find and run GAM.  I run it in the provided free Cloud Shell.

gam() { "/home/k_melillo/bin/gam/gam" "$@" ; }

You will have to change the path to point to the GAM executable, but otherwise, it should run.

Note, after you make the change and save the file, re-run the .bashrc file, or close and reopen the shell.
~/.bashrc

On Thu, Oct 10, 2019 at 3:03 PM Anthony Cosentino <Anthony....@cogeco.com> wrote:
Hey Kevin,

Thanks. I just started using Cloud Shell and really don't have much experience with it. I switched to wanting to use GAM in GCP because of the SSL Cert errors I keep getting when trying to use GAM on my Windows 10 laptop. I was able to find the .bashrc, but I have no idea what to do next. Any ideas?

Thanks man.

On Thursday, 10 October 2019 14:55:02 UTC-4, k.melillo wrote:
You will need to use the File\Open command.  When you use this, it will show the hidden files.  You can also just use the command-line interface with an editor to open this file... for example
nano .bashrc


On Thu, Oct 10, 2019 at 2:50 PM Anthony Cosentino <Anthony....@cogeco.com> wrote:
I have installed the latest version of GAM in GCP and uploaded my client_secrets.json,oauth2service.json, and oauth2.txt files into my cloud shell home directory. I can't find this .bashrc file in order to setup the alias portion. Can someone please let me know how to add this file and then update it. 

2019-10-10 14_47_32-Cloud Shell.png


Thanks,
Anthony

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.


--
photo
Kevin Melillo
Electronic Communications Analyst, Information Technology

Phone: 732.465.6609 | Mobile: 732-609-4331

Email: k.me...@ieee.org

445 Hoes Lane Piscataway, NJ 08854

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.

Kevin Melillo ✉

unread,
Oct 10, 2019, 3:38:03 PM10/10/19
to google-ap...@googlegroups.com
.bashrc is a plain text file.  You will need to add the line to it so that the alias gam will run the gam commands.

gam is a command-line tool that needs to run from a shell.

You will need to connect via SSH to your cloud instance in order to take advantage of GAM.

To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.


--
photo
Kevin Melillo
Electronic Communications Analyst, Information Technology

Phone: 732.465.6609 | Mobile: 732-609-4331

Email: k.me...@ieee.org

445 Hoes Lane Piscataway, NJ 08854

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.


--
photo
Kevin Melillo
Electronic Communications Analyst, Information Technology

Phone: 732.465.6609 | Mobile: 732-609-4331

Email: k.me...@ieee.org

445 Hoes Lane Piscataway, NJ 08854

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/bec683e3-9ed6-4e95-b444-326d55142d11%40googlegroups.com.

Anthony Cosentino

unread,
Oct 10, 2019, 4:05:32 PM10/10/19
to GAM for G Suite
Thanks for your help Kevin. Ross was able to help out. 

To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.


--
photo
Kevin Melillo
Electronic Communications Analyst, Information Technology

Phone: 732.465.6609 | Mobile: 732-609-4331

Email: k.me...@ieee.org

445 Hoes Lane Piscataway, NJ 08854

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.


--
photo
Kevin Melillo
Electronic Communications Analyst, Information Technology

Phone: 732.465.6609 | Mobile: 732-609-4331

Email: k.me...@ieee.org

445 Hoes Lane Piscataway, NJ 08854

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages