aajy / thinking

0 stars 0 forks source link

git bash 오류 발생 #1

Open aajy opened 3 weeks ago

aajy commented 3 weeks ago

오류 문구

0 [bash] bash 1464 dofork: child -1 - forked process 4856 died unexpectedly, retry 0, exit code 0xC0000005, errno 11
bash: fork: retry: Resource temporarily unavailable

image

증상

aajy commented 3 weeks ago

작업을 먼저 하기위해 powerShell로 터미널을 열어 진행하려던 중 발생한 npm start 명령을 실행할 때 "액세스가 거부되었습니다." 를 먼저 해결하고자

powerShell의 권한 변경 관리자 권한으로 PowerShell 실행: PowerShell 아이콘을 마우스 오른쪽 버튼으로 클릭하고 "관리자 권한으로 실행"을 선택합니다. PowerShell에서 실행 정책 확인 : Get-ExecutionPolicy 실행 정책을 "RemoteSigned"로 변경 : Set-ExecutionPolicy RemoteSigned 을 실행 -> 후에 전체 끄고 다시 실행하니 git bash까지 에러없이 작동됨.

추가 작업1) oneDrive문제일 수도 있어서, 동기화를 끄고자 파일 경로에서 oneDrive를 제거(파일위치이동) 추가작업2) 메모리 문제일 수도 있다고 하여, 작업관리자를 들어가 메모리를 차지하는 프로그램을 끄다가, 그냥 전체 껐다가 킴.

aajy commented 3 weeks ago

작업을 먼저 하기위해 powerShell로 터미널을 열어 진행하려던 중 발생한 npm start 명령을 실행할 때 "액세스가 거부되었습니다." 를 먼저 해결하고자

powerShell의 권한 변경 관리자 권한으로 PowerShell 실행: PowerShell 아이콘을 마우스 오른쪽 버튼으로 클릭하고 "관리자 권한으로 실행"을 선택합니다. PowerShell에서 실행 정책 확인 : Get-ExecutionPolicy 실행 정책을 "RemoteSigned"로 변경 : Set-ExecutionPolicy RemoteSigned 을 실행 -> 후에 전체 끄고 다시 실행하니 git bash까지 에러없이 작동됨.

추가 작업1) oneDrive문제일 수도 있어서, 동기화를 끄고자 파일 경로에서 oneDrive를 제거(파일위치이동) 추가작업2) 메모리 문제일 수도 있다고 하여, 작업관리자를 들어가 메모리를 차지하는 프로그램을 끄다가, 그냥 전체 껐다가 킴.

다시 생각해보니, 아마도 oneDrive의 용량이 차서, 자동 로그아웃이 되었던 것이 원인이었을 수도 있다.

파일에 접근할 수 있는 권한이 oneDrive의 로그인된 파일상태인데, 로그아웃 되어있어서(???)가 아닐까. 원인이 될 수 있는지 궁금하다. 어떻게 알아보면 될까.

oneDrive가 자동으로 동기화 되다가 용량이 부족하다는 메세지를 계속 무시했더니 예기치 못한 일이 일어난 것 같다.

다른 분들은 로컬작업과 이미지 문서 등은 로컬에 두고, 드라이브에 저장하고 싶은 파일은 따로 업로드해서 관리하는지 궁금하다. oneDrive계정이 있으면 다른 컴퓨터에서 이 계정으로 로그인만 하면, 사용하던 환경 그대로 다른 컴퓨터에서 사용가능한 장점이 있지만, 생각해보면 내가 원하는 파일만 의식적으로 드라이브에 올려 관리하는 것이 나은 것 같다.

aajy commented 3 weeks ago

다시 아래의 오류가 발생했다.

      0 [bash] bash 4210 dofork: child -1 - forked process 25748 died unexpectedly, retry 0, exit code 0xC0000005, errno 11
bash: fork: retry: Resource temporarily unavailable
      0 [bash] bash 4255 dofork: child -1 - forked process 24852 died unexpectedly, retry 0, exit code 0xC0000005, errno 11
bash: fork: retry: Resource temporarily unavailable
2196096 [bash] bash 4255 dofork: child -1 - CreateProcessW failed for 'C:\Program Files\Git\bin\..\usr\bin\bash.exe', errno 13
bash: fork: Permission denied
aajy commented 3 weeks ago

또 다른 오류

E325: ATTENTION
Found a swap file by the name "~/바탕 화면/react/thinking/.git/.COMMIT_EDITMSG.swp"
          owned by: aajy0   dated: Tue Jun 11 20:09:29 2024
         file name: ~aajy0/바탕 화면/react/thinking/.git/COMMIT_EDITMSG
          modified: YES
         user name: aajy0   host name: DESKTOP-QBCBRA3
        process ID: 4209
While opening file "/c/Users/aajy0/바탕 화면/react/thinking/.git/COMMIT_EDITMSG"
             dated: Tue Jun 11 20:13:47 2024
      NEWER than swap file!

(1) Another program may be editing the same file.  If this is the case,
    be careful not to end up with two different instances of the same
    file when making changes.  Quit, or continue with caution.      
(2) An edit session for this file crashed.
    If this is the case, use ":recover" or "vim -r /c/Users/aajy0/바탕 화면/react/thinking/.git/COMMIT_EDITMSG"
    to recover the changes (see ":help recovery").
    If you did this already, delete the swap file "/c/Users/aajy0/바탕 화면/react/thinking/.git/.COMMIT_EDITMSG.swp"
    to avoid this message.

Swap file "~/바탕 화면/react/thinking/.git/.COMMIT_EDITMSG.swp" already exists!
-- More --
aajy commented 3 weeks ago

또 다른 오류

E325: ATTENTION
Found a swap file by the name "~/바탕 화면/react/thinking/.git/.COMMIT_EDITMSG.swp"
          owned by: aajy0   dated: Tue Jun 11 20:09:29 2024
         file name: ~aajy0/바탕 화면/react/thinking/.git/COMMIT_EDITMSG
          modified: YES
         user name: aajy0   host name: DESKTOP-QBCBRA3
        process ID: 4209
While opening file "/c/Users/aajy0/바탕 화면/react/thinking/.git/COMMIT_EDITMSG"
             dated: Tue Jun 11 20:13:47 2024
      NEWER than swap file!

(1) Another program may be editing the same file.  If this is the case,
    be careful not to end up with two different instances of the same
    file when making changes.  Quit, or continue with caution.      
(2) An edit session for this file crashed.
    If this is the case, use ":recover" or "vim -r /c/Users/aajy0/바탕 화면/react/thinking/.git/COMMIT_EDITMSG"
    to recover the changes (see ":help recovery").
    If you did this already, delete the swap file "/c/Users/aajy0/바탕 화면/react/thinking/.git/.COMMIT_EDITMSG.swp"
    to avoid this message.

Swap file "~/바탕 화면/react/thinking/.git/.COMMIT_EDITMSG.swp" already exists!
-- More --

위 오류를 요약하면, Vim편집기에서 편집 중인 파일에 대한 스왑 파일이 이미 존재한다는 것을 나타냅니다. 스왑 파일은 Vim이 편집 중인 파일의 복사본을 저장하는 임시 파일입니다. Vim편집기는 터미널에서 Git 커밋 메시지를 작성할 때 사용됩니다.

🚨 위에서 발생한 Permission denied 오류로 인해서 Vim이 켜져있는 터미널을 강제 종료한 뒤, 새로운 터미널에서 다시 Git 커밋 메시지 작성을 위한 git commit명령어를 실행해서 발생한 에러입니다.

해결 : 어떻게 할 건지 선택지가 주어지기 때문에, 이어서 수정하는 명령어를 입력해 해결하였습니다.

아래는 Vim이미지 image

aajy commented 3 weeks ago

git bash오류 해결을 위한 처리2

내 PC 마우스 오른쪽 -> 속성 -> 고급 시스템 설정 -> 환경변수 -> PATH 변수에 C:\Program Files\Git\usr\bin 경로가 포함되어 있는지 확인