Xcode에서 http로 git push가 불가능할 때의 해결 방법
내 환경은 Giit Bucket이지만, 나는 Giit Hub과 Giit Lab이 모두 같다고 생각한다.
실패 상태
이렇게 해서
http
원격 창고를 설정했습니다.
push를 사용하면user/password를 입력해야 합니다.

정확한 user/password를 입력해야 하는데 성공하지 못했습니다.Cancel이면 오류를 인증한다는 메시지가 나왔습니다.

아파치 로그 확인 후 아파치까지 받았는데 401에서 반납.
xx.xxx.xxx.xx - - [30/Nov/2016:16:24:38 +0900] "GET /gitbucket/git/xxxx/xxxx.git/info/refs?service=git-receive-pack HTTP/1.1" 401 1019 "-" "git/1.0 (libgit2 0.24.0)"
Stack Overflow를 낚아도 뾰족한 해결책이 없을 것 같다.다음 기사
Xcode accepts just ssh://[email protected]:2222/project-name
에 따르면 소스는 발견되지 않았지만 ssh면 괜찮을 것 같다고 한다.관리자가 GiitBucket에 로그인하여
System Settings
하면 Enable SSH access to git repository
프로젝트를 확인합니다!확인란을 선택하고 GiitBucket 서버의 호스트 및 SSH 포트를 입력합니다.(Port는 특별히 신경 쓰지 않는다. 이렇게)
SSH 액세스를 허용하려면 기본 URL을 설정해야 하므로 GiitBucket URL을 입력하여 설정을 저장합니다.

여기에 설정된 SSH의 포트에 연결할 수 있도록 Firewall 설정도 수정하고 restart를 진행합니다.
이렇게 하면 각 사용자가 SSH Key를 등록하여 키를 생성할 수 있습니다.(귀찮아서 비밀번호가 없어요)
$ ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/tenten0213/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /Users/tenten0213/.ssh/id_rsa.
Your public key has been saved in /Users/tenten0213/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX [email protected]
The key's randomart image is:
+---[RSA 2048]----+
| .. o.o.E*%|
| . ..... o.+ %B|
| + ..+...o.* *|
| . + o +.o.o . |
| o . S + . o |
| . o + o o |
| . . o o |
| . . . |
| . |
+----[SHA256]-----+
상기 제작id_rsa.pub
의 내용을 GiitBucket에 등록한다.
이렇게 하면push의 준비가 된다.
Giit의 Remote URL은 SSH로 미리 변경됩니다.

이렇게 하면 Xcode에서push를 진행하면 연결 목적지를 신뢰하는지 물어본다
Trust

암호문이 없으면 키가 생성되기 때문에, 그렇게
OK
하면push가 성공할 것입니다.
감상
HTTP로 push 못한 거 거짓말이지?!그래서 나는 많은 것을 찾았지만 쓸모 있는 정보가 없어서 고생했다.
다른 IDE(Eclipse, IntelliJ IDEA)에서는 같은 환경에서 고생한 적이 없어 Xcode가 무섭게 느껴진다...

(사실 더 간단한 정보가 있었으면 좋겠어요!!)
Reference
이 문제에 관하여(Xcode에서 http로 git push가 불가능할 때의 해결 방법), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/tenten0213/items/21c47f432b51e8da5866텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)