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
{{ message }}
Repository navigation
recurring 403 errors while provisioning the conflict-practices repositories #350
Problem:
The generation of the conflict-practices repositories cannot be handled unattended. It requires a lot of reruns on bigger classes and takes full concentration that you cannot give your class while resolving this. The bigger the class the bigger the problem
Observed behavior:
The generation of the conflict-practices repositories (option 4 in the scrip) is giving recurring 403 errors. Every 4th repository it is trying to make results into HTTP 403 Forbidden warning. Every consecutive repos gets the same.
Workaround:
This requires you to rerun the script, skipping every repository you already created. You will need to do this roughly for the #contributors / 4.
Expected behavior:
Script generates conflict-practices repositories unattended while I can focus on teaching the class
Ther are two ways to authenticate with the scripts, first is the .trainingmanualrc which contains the token for the GH commands. There is another authentication required for the git commands, that is what you see here.
I believer ther is a separate issue for that.
The only thing this part is doong is asking for authentication for git. As iam using wsl and normally dont use wsl for day to day work I run into all kind of issues. Most of them are already known in other issues (OSTYPE for the sed command, git credential manager so i use a pat token, the missing validation vor correct httpie version that support —quiet)
I've been running on Mac for years with no issues like you're seeing. Max class size around 30 or so but typically around 20. I wonder if there's some weird quirk specific to WSL.
My guess is you use your mac for day 2 day development work too and have it set up correctly in that manner. I only use WSL to run the scripts. Normally pscore is my script of choice on windows. If the credential manager is set up it will take care of the git authentication, that's why you are not asked to put in username:token. Also the script has some more if statement like if [[ "$OSTYPE" = "msys" ]] then that should be if [[ "$OSTYPE" = "msys" || "$OSTYPE" = "linux-gnu" ]]; then to work in the create-files. Just as an example stated that there are some alternative code flows
When following the flow just before the first 403 I track it down to a function in the shared_functions:300 if http --check-status --ignore-stdin --quiet --auth \ "$TOKEN_OWNER:$TEACHER_PAT" "$org_repos_endpoint/$repo/pulls" \ title="$title" \ head="$head" \ base="$base" \ body="$body"; then echo "Done." fi
This is using the token from the .trainersmanualrc and is not related to the Git authentication that was discussed above.
Commonality between all different tries is that it always starts with the "Creating pull request: Minor CSS fixes" after that first failure it constantly fails for all creating PR calls. Other calls can still succeed.
Activity
amyschoen commentedon Mar 1, 2022
This part immediately looks strange to me:
Do you have your class tokens properly set up? I never get asked for a username or password.
UncleBats commentedon Mar 1, 2022
Ther are two ways to authenticate with the scripts, first is the .trainingmanualrc which contains the token for the GH commands. There is another authentication required for the git commands, that is what you see here.
I believer ther is a separate issue for that.
The only thing this part is doong is asking for authentication for git. As iam using wsl and normally dont use wsl for day to day work I run into all kind of issues. Most of them are already known in other issues (OSTYPE for the sed command, git credential manager so i use a pat token, the missing validation vor correct httpie version that support —quiet)
this is just a line asking me for a git token
amyschoen commentedon Mar 1, 2022
I've been running on Mac for years with no issues like you're seeing. Max class size around 30 or so but typically around 20. I wonder if there's some weird quirk specific to WSL.
UncleBats commentedon Mar 1, 2022
My guess is you use your mac for day 2 day development work too and have it set up correctly in that manner. I only use WSL to run the scripts. Normally pscore is my script of choice on windows. If the credential manager is set up it will take care of the git authentication, that's why you are not asked to put in username:token. Also the script has some more if statement like
if [[ "$OSTYPE" = "msys" ]] thenthat should beif [[ "$OSTYPE" = "msys" || "$OSTYPE" = "linux-gnu" ]]; thento work in the create-files. Just as an example stated that there are some alternative code flowsUncleBats commentedon Mar 1, 2022
When following the flow just before the first 403 I track it down to a function in the shared_functions:300
if http --check-status --ignore-stdin --quiet --auth \ "$TOKEN_OWNER:$TEACHER_PAT" "$org_repos_endpoint/$repo/pulls" \ title="$title" \ head="$head" \ base="$base" \ body="$body"; then echo "Done." fiThis is using the token from the .trainersmanualrc and is not related to the Git authentication that was discussed above.
Commonality between all different tries is that it always starts with the "Creating pull request: Minor CSS fixes" after that first failure it constantly fails for all creating PR calls. Other calls can still succeed.
wulfland commentedon Mar 1, 2022
I have the same issue on mac and also have to rerun the script several times. Also the cleanup scripts are not working.