How Do You Find the Details of Permissions/Privileges of a User in GitHub Enterprise?

Problem scenario
You are using GitHub Enterprise. You want to see the details of a user’s permissions (e.g., when it was created or before someone modified the user’s ability to control repos). What do you do?

Solution

  1. Go to the Audit Log in the web UI. (To learn more about this, see this external site.)
  2. Search for the user by the username.

How Do You Solve the MacOS Command Line Error “No Java runtime present…”?

Problem scenario
Using a MacOS, you are trying to run a command (e.g., a “java” command) from the Terminal utility (character prompt). You get the message “No Java runtime present”, and the command fails. What should you do?

Solution
Using the GUI, download the .dmg file from here.

Once it is downloaded, double click it. Follow the menu steps (Continue ->

What Are Eight Ways of Rotating AWS IAM Keys?

Problem scenario
You want to rotate AWS IAM keys across a unique set of different AWS accounts. Regular rotation is a recommended practice for securing your AWS resources (per this Amazon posting). Just as passwords can be brute-forced and defeated through exhaustive attempts, access keys could be randomly generated and attempted via a malicious person or program; rotating the access keys can make hacking your AWS resources tremendously more difficult.

How Do You Find a File by Name in GitHub (when it is not otherwise showing up)?

Problem scenario
You are searching GitHub for a file by its name. But for some reason it is not showing up in the results. What should you do?

Solution
Use the “filename:” option in the search terms before the name of the file you are looking for.
org:coolorgname filename:rio.yml

For some reason this “filename:” option returns more results.

How Do You Install “inspec” with gem from the Command Line?

Problem scenario
You want to install the inspec gem. What do you do?

Solution
Run this:
gem install inspec
(Taken from https://mitre-inspec-developer.netlify.app/installation/linuxinstall.html )

Does the inspec-bin command work? This may be a newer version that is already installed.

If you installed Ruby with root, which is not recommended according to https://stackoverflow.com/questions/24706277/error-sudo-gem-command-not-found,

How Do You Troubleshoot “Some of the defined forwarded ports would collide” after Running a Chef Kitchen or Ansible Molecule Command?

Problem scenario
You run a kitchen or molecule command. It fails with an error about ports. What should you do?

Solution
Find what other machines are running in your VPC. This error message seems to be relevant to Vagrant (because if you google it, you will see Vagrant-related postings). If you are using Vagrant, run this command: vagrant global-status

If you are not using Vagrant,

How Do You Terminate a Process Listening on a Given TCP Port?

Problem scenario
There is a process listening on a TCP port on your Linux system. How do you end it?

Solution
Assuming you want to terminate the process 5555, this is how you would find the PID:

sudo lsof -i :5555

To kill the process, the output of the above command will show you a PID. Run this command where 111222333 is the PID number you found above:

sudo kill -9 111222333 …

How Do You Unlock a GitHub Repository when You Only Know Its Name?

Problem scenario
You want to unlock a GitHub repository. You know the name of the repo. (When you browse to it in a web browser, you see that it is locked, and you cannot see the files inside as normal.) How do you unlock it?

Solution
You need to find the migration GUID for the locked repository. Then you need to run a command on it.

How Do You List the Kafka Topics when You Cannot Find the kafka-topics.sh File?

Problem scenario
You cannot find kafka-topics.sh. But you want to list the Kafka topics. What should you do?

Solution
Find the kafka-topics binary file. Use something like this (but replace “localhost” with the server name of Zookeeper and “2181” with the TCP port number):

kafka-topics –list –zookeeper localhost:2181

(This was adapted from https://stackoverflow.com/questions/44405663/list-all-kafka-topics.)