웹개발/깃허브
-
윈도우에서 cURL 써서 Git API 사용하기웹개발/깃허브 2019. 4. 16. 14:34
1. CMD 2. Git Bash 1 CMD 깃 api이용해서 curl 명령어로 원격 저장소의 내용을 수정하는 명령을 수행했다. 성공하면 커밋결과 제이슨을 리턴한다 curl 명령어는 아래 링크 참고했는데 리눅스 명령어라서 윈도우랑 다르다. https://gist.github.com/aborruso/40aee4f1738c0a0e3727bf7cbec91152 #!/bin/bash cartella="/var/myfolder" # update the file curl -i -X PUT -H 'Authorization: token 4d013330xxxxxxxxxxxxxx' -d "{\"path\": \"mattei.csv\", \ \"message\": \"update\", \"content\": \"$(open..
-
Config Server 깃 저장소 어플리케이션마다 디렉토리 나누기웹개발/깃허브 2019. 4. 15. 17:09
스프링 클라우드 컨피그 서버에 깃 저장소를 연결하여 클라이언트가 필요한 설정파일을 가져가는 상황. 컨피그 클라이언트가 1개이상이면 디렉토리를 나누지 않고는 파일이 너무 많아진다. 클라이언트(어플리케이션)마다 디렉토리를 나누도록 하는 방법은 컨피그 서버에 설정을 주면된다. 이 내용은 spring공식 메뉴얼에 있다. 아래처럼 파일이 너무 많으면 관리하기 어렵다 로컬에서 원하는 디렉토리 구조로 만들어주고 원격저장소에 푸시한다 그리고 다음과 같은 설정은 컨피그 서버의 application.yml에 추가한다. search-paths : 어플리케이션명1, 어플명2, .... 주의할 점은 웹에서 저장소의 디렉토리를 바꾸면 로컬 컨피그 서버의 설정내용과 달라져서 에러가 날 수 있다.
-
[에러]Config Client 실행시 Config Server Git Repository를 찾지 못함/ Working tree is not clean 에러 메세지웹개발/깃허브 2019. 4. 15. 16:47
문제상황 Spring Cloud의 Config 서버와 클라이언트, git 저장소를 설정파일 저장소로 쓰는 상황에서 Config Client 구동시 서버에서 설정파일을 못찾는 에러가 발생했다. http://컨피그서버루트/application/profile 로 GET했을때 콘솔에 working tree is not clean이라는 메세지가 뜨면서 브라우저에는 404가 발생한다. 에러메세지 [] 15:48:25 [restartedMain]INFO [o.s.c.c.client.ConfigServicePropertySourceLocator.class] - Fetching config from server at : http://localhost:8999 [] 15:48:28 [restartedMain]WARN [o..
-
포스트맨으로 Git Repository 파일 수정하기웹개발/깃허브 2019. 4. 15. 15:27
참고자료 https://stackoverflow.com/questions/48745796/github-api-v3-update-file-not-working-404 Github API v3: Update file not working (404) I'm trying to update a file using the Github v3 api. Most of the documentation I could find was based on the older API. I want to utilize: https://developer.github.com/v3/repos/contents/#update-a-f... stackoverflow.com https://stackoverflow.com/questions/202075..