You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: cs50.dev.md
+35-1
Original file line number
Diff line number
Diff line change
@@ -142,7 +142,7 @@ Note that scopes are not as granular as would be ideal. The `codespace` scope te
142
142
143
143
When you log into Visual Studio Code for CS50, your codespace is configured with a "token" that has `repo`[scope](https://docs.github.com/en/developers/apps/building-oauth-apps/scopes-for-oauth-apps#available-scopes), which lets `git` access repositories to which your GitHub account has access.
144
144
145
-
If you try to access a repository that's owned by an [organization](https://docs.github.com/en/organizations/collaborating-with-groups-in-organizations/about-organizations) that has not granted access to Visual Studio Code for CS50, though, `git` might err with "Repository not found." (And `gh` might err with "Could not resolve to a Repository.") To grant (or request) access for that organization, visit [github.com/settings/connections/applications/d1a90a524497a69391fa](https://github.com/settings/connections/applications/d1a90a524497a69391fa). Alternatively, you can configure your codespace to use [SSH](/github/#ssh) or a [personal access token](/github/#personal-access-token) instead, both of which would have access to any repositories to which your GitHub account has access, whether or not owned by an organization.
145
+
If you try to access a repository that's owned by an [organization](https://docs.github.com/en/organizations/collaborating-with-groups-in-organizations/about-organizations) that has not granted access to Visual Studio Code for CS50, though, `git` might err with "Repository not found." (And `gh` might err with "Could not resolve to a Repository.") To grant (or request) access for that organization, visit [github.com/settings/connections/applications/d1a90a524497a69391fa](https://github.com/settings/connections/applications/d1a90a524497a69391fa). Alternatively, you can configure your codespace to use [SSH](https://cs50.readthedocs.io/github/#ssh) or a [personal access token](https://cs50.readthedocs.io/github/#personal-access-token) instead, both of which would have access to any repositories to which your GitHub account has access, whether or not owned by an organization.
146
146
147
147
### Domains
148
148
@@ -163,6 +163,40 @@ If on a corporate or school network that blocks any of the above, you might need
163
163
164
164
## Troubleshooting
165
165
166
+
### I'm seeing "Oh no, it looks like you are offline" error message.
167
+
168
+
First of all, make sure all the required [domains](https://cs50.readthedocs.io/cs50.dev/#domains) are not blocked by your device or internet environment.
169
+
170
+
Check that you have a stable internet connection and that your home, school, or company network is not blocking the connection. If possible, check logging for rejected connections on your device.
171
+
172
+
To inspect network activity in your browser, follow one of these instructions:
If you see rejected connections, make sure the domains documented by the `/meta` REST API endpoint are not blocked by your firewall. Again, in other words, none of [these domains](https://cs50.readthedocs.io/cs50.dev/#domains) should be blocked.
179
+
180
+
Optional: For more information, see ["REST API endpoints for meta data."](https://docs.github.com/en/rest/meta/meta#get-github-meta-information)
181
+
182
+
You can run this command in your terminal to get the list of domains required by GitHub Codespaces:
183
+
184
+
```bash
185
+
curl -L \
186
+
-H "Accept: application/vnd.github+json" \
187
+
-H "Authorization: Bearer <YOUR-TOKEN>" \
188
+
-H "X-GitHub-Api-Version: 2022-11-28" \
189
+
https://api.github.com/meta
190
+
```
191
+
192
+
Follow [this instruction](https://cs50.readthedocs.io/github/#personal-access-token) to generate a GitHub personal access token.
193
+
194
+
Alternatively, to get the list of domains required by GitHub Codespaces, execute the following command using [GitHub CLI](https://cli.github.com/):
195
+
196
+
```bash
197
+
gh api meta | jq .domains.codespaces
198
+
```
199
+
166
200
### How to monitor global variables in debugger
167
201
168
202
In debug50's **RUN AND DEBUG** pane, there's a section labeled **WATCH**. You can add expressions to this section, and the debugger will show you the values of these expressions as you step through the program. The expressions can include global variables and array names.
0 commit comments