Yes. If you own the code in a repository, you can license it, and GitHub is the easiest place for it to be. You connect your account with read-only access, pick the repos you want to include, and a real per-repo estimate appears within minutes. GitLab and Bitbucket work the same way.
Nothing about the repository changes. It stays in your account, under your name, with your history. A scrubbed review copy is made for grading, and that copy is what buyers see. You keep pushing to the repo, using it and shipping it as before.
Private repos are what labs want most. Public code is already easy for anyone to find, so a private repo with a long, real history is far more useful. Public repos you wrote yourself can still be included. Forks are a different matter: only the commits you wrote are yours, and repos that are mostly someone else’s work add little.
What happens to my GitHub repo when it is licensed?
Nothing you would notice. Read-only access lets the program copy the repos you select with their history. It cannot push, delete, change settings or see repos you did not pick. You can revoke the access from your GitHub settings whenever you like. The copy is scrubbed of secrets and personal data, graded and taken to buyers in batches. Your repo keeps its name, visibility, stars and issues, and nobody outside sees it.
GitHub organizations work the same way as personal accounts. If the repos belong to a company organization, someone with authority signs for the company and an owner grants the read-only access. You can include some repos from an organization and leave others out.