Set Up Codex and GitHub Access for Chico State Developers

Summary

This article helps Chico State developers request access and configure Git, GitHub CLI, and Codex to work with repositories in the csu-co-chico GitHub organization.

Body

Quick Links: What is Codex? | Before You Begin | Choose Your Workflow | Verify GitHub Access | | Who Should Use This Article? | Install Git and GitHub CLI | Configure Git Identity | Authenticate GitHub CLI | Verify GitHub Access | Sign In to Codex | Open a Repository in Codex | Connect Codex Web to GitHub | Troubleshoot Access Issues | Reference Documentation |

What is Codex?

Codex is OpenAI's coding agent for software development. It can help you understand a codebase, write and modify code, run tests, and review changes. Codex does not replace GitHub permissions, code review, testing, or required approvals.

Before You Begin

Complete the GitHub Enterprise Access and Repository Request before continuing. The request is used to obtain access to the Chico State GitHub organization and repositories. Codex may also require enablement in the Chico State ChatGPT workspace; if Codex is unavailable after your request is approved, contact your ChatGPT workspace administrator.

RequirementWhat to confirm
Chico State identityYou can sign in with your Chico State account and complete MFA or SSO prompts.
Codex accessCodex is enabled for your ChatGPT workspace or your administrator has confirmed that it is available to you.
GitHub accessYou submitted the request above, your GitHub account has been added to csu-co-chico, and you accepted any organization or repository invitation.
Computer accessYou can install Git and GitHub CLI, or have an administrator install them for you.

Codex access and GitHub access are separate. Codex determines whether you can use the coding agent; GitHub organization membership and repository permissions determine which repositories you can access.

Who Should Use This Article?

This article is intended for Chico State developers who need Codex to work with repositories in the GitHub organization csu-co-chico.

Choose Your Workflow

Choose the path that matches how you will use Codex:

  • Codex Local: Use this path when Codex runs on your computer. You authenticate GitHub CLI and Codex separately, clone the repository locally, and run Codex from the repository directory.
  • Codex Cloud: Use this path when Codex runs in the ChatGPT web experience. You connect GitHub in Codex, select the csu-co-chico organization and an allowed repository, and create or select a Codex environment.

Successful GitHub CLI authentication does not automatically authenticate Codex, and Codex Cloud does not use your computer's local GitHub CLI session.

Install Git and GitHub CLI

Install Git and GitHub CLI (gh) using your operating system's package manager.

Debian/Ubuntu example:

sudo apt update
sudo apt install git gh

If you do not have administrator rights, install gh in your home directory and ensure ~/.local/bin is included in your PATH.

Configure Git Identity

Configure Git using your Chico State identity:

git config --global user.name "Your Name"
git config --global user.email "username@csuchico.edu"
git config --global init.defaultBranch main

Authenticate GitHub CLI

Authenticate GitHub CLI using HTTPS:

gh auth login --hostname github.com --git-protocol https --web --scopes repo,read:org,workflow
gh auth setup-git --hostname github.com

During login:

  • Sign in with the GitHub account associated with your Chico State identity.
  • Complete any MFA, SSO, or passkey prompts.
  • Authorize the csu-co-chico organization if prompted.

Verify GitHub Access

Check login status:

gh auth status --hostname github.com

Expected result: GitHub CLI reports the GitHub username you intended to use and shows that the account is authenticated.

Check organization access:

gh api orgs/csu-co-chico --jq '.login + " " + .html_url'
gh repo list csu-co-chico --limit 20

Verify repository access without cloning:

GIT_TERMINAL_PROMPT=0 git ls-remote https://github.com/csu-co-chico/REPO_NAME.git HEAD

Replace REPO_NAME with a repository you can access.

Sign In to Codex

Sign in to Codex:

codex login

For remote or headless systems:

codex login --device-auth

Verify login:

codex login status

Expected result:

Logged in using ChatGPT

Open a Repository in Codex

Clone a repository and launch Codex:

mkdir -p ~/code
cd ~/code
gh repo clone csu-co-chico/REPO_NAME
cd REPO_NAME
codex

Codex Local uses your local repository working tree. GitHub pull request context requires GitHub CLI to be installed and authenticated.

Connect Codex Web to GitHub

  1. Go to https://chatgpt.com/codex.
  2. Select Connect to GitHub if prompted.
  3. Choose the GitHub account that has access to csu-co-chico.
  4. Install or connect the ChatGPT GitHub Connector.
  5. Select csu-co-chico as the installation target when applicable.
  6. Allow the repositories Codex should access.
  7. Create or select a Codex environment for the repository.

Codex uses short-lived GitHub App installation tokens and honors existing GitHub permissions and branch protection policies.

Troubleshoot Access Issues

Issue Resolution
Git clone prompts for a username

Run:

gh auth setup-git --hostname github.com

Then test:

GIT_TERMINAL_PROMPT=0 git ls-remote https://github.com/csu-co-chico/REPO_NAME.git HEAD
Organization or repositories are not visible

Check:

gh auth status --hostname github.com
gh api user --jq '.login'
gh api orgs/csu-co-chico --jq '.login'
gh repo list csu-co-chico --limit 20
  • Confirm you signed in with the correct GitHub account.
  • Confirm your account has access to csu-co-chico.
  • Confirm SSO authorization has been completed.
  • Confirm the ChatGPT GitHub Connector has been approved for the repository.
Codex reports unauthorized access
  • You are a member of the Chico State ChatGPT workspace.
  • Codex Local is enabled.
  • Codex Cloud is enabled if needed.
  • Applicable Codex policies allow the intended workflow.

Support and Maintenance

If the steps fail, contact IT Support Services and include your GitHub username, the repository name, whether you are using Codex Local or Codex Cloud, the command or screen that failed, and the complete error message with credentials removed. Never include passwords, access tokens, private keys, auth.json, or other credential files in a ticket or chat.

This article should be reviewed at least annually and whenever Codex, GitHub organization policies, authentication procedures, or the request form changes. The article owner should verify the links, screenshots, command output examples, and workspace availability during each review.

Reference Documentation

 Still need help? Contact IT Support Services for further assistance.
  
 Help us improve our Knowledge Base! Click Yes or No below, then let us know what worked — or what didn’t. Your feedback helps us improve our content and provide the best possible support. 

Details

Details

Article ID: 115376
Created
Mon 6/22/26 12:52 PM
Modified
Fri 8/28/26 3:39 PM