TRANSLATE: KB: 상태 코드 471이 있는 Git 오류로 인해 프로젝트를 저장할 수 없습니다

A365 A365
A365 작업 공간의 git 서버는 오용에 대한 보호 기능을 갖추고 있습니다: zip, 7z, rar과 같은 다음 유형의 이진 파일이 256MB를 초과하는 경우 허용하지 않습니다. 이러한 파일을 저장소에 푸시하면 고객 데이터의 클라이언트 측 및 서버 측 처리가 크게 느려질 수 있으며, 서비스 거부에 이를 수 있습니다. 사용자가 Altium Designer에서 이러한 파일을 서버에 저장하려고 시도하면, 서버에서 Git 오류: 상태 코드 471로 요청이 실패했다며 저장 작업을 거부합니다.

Solution Details

Why this happens

The git server of an Altium 365 workspace has protection against misuse: it does not allow binary files larger than 256 MB of the following types:
-  zip
-  7z
-  rar

Pushing those files to repositories can lead to a significant slowdown in both client-side and server-side processing of customer data, up to denial of service.

Once the user tries to save such a file to the server from Altium designer, the save operation will be rejected by the server with the following error code:
Git Error: request failed with status code: 471

In that case, the user will have to take this file out of version control in their local git repository.

Prerequisites
Users need to download and install git SCM: https://git-scm.com/download/win . The “standalone installer” is recommended, most likely it will be the “64-bit” installer, but it depends on the operating system (here is how to check this: link).

Commands to take the file out of version control
1  Determine the location of the project git repository on disk. Right click on the project in the Projects panel, then click Explore:
Projects panel>then click Explore

2  Windows explorer will open. Copy the full path to the folder:

3  Start “Git Bash” utility:
Git bash

4  Change the current directory to the one you copied from Windows explorer 
cd "C:\Users\Public\Documents\Altium\Sample - Kame_FMU

5  Execute the following command to find out which files violate server restrictions for size:

6  git rev-list --objects "origin/master..master" | git cat-file $'--batch-check=%(objectname)\t%(objecttype)\t%(objectsize)\t%(rest)' | gawk -F '\t' -v maxbytes="256000000" '$3 > maxbytes' | cut -f 4- | grep -E "\.(zip|rar|7z)"

    The command will output the file (or the list of files) that cannot be pushed to the server. In our example, the file is “bad.zip”:
cmd line

7  Execute the following command to start editing the repository: 
    git reset --soft $(git merge-base origin/master HEAD)

8  Take the file(s) you found on step 6 out of version control using the git reset command for each file. In our example there is only one such file, so we’re executing this command once: 
git reset bad.zip

9  Return to Altium designer and refresh the project from version control:
refresh the project from version control

10 Then click Save to Server as usual. Make sure you don’t select the restricted files again:
Don't select the zip folder when saving to server

11 The project should be saved without errors.

If you find an issue, select the text/image and pressCtrl + Enterto send us your feedback.