Connecting to github by https using user:pw@github.com/repo when pw ends with @

前端 未结 2 863
故里飘歌
故里飘歌 2021-01-21 12:52

I am using GIT_REPO_URL=\"https://$GIT_ACCOUNT:$USER_PW@github.com/XXXX/xxx\" syntax.

Lately I have changed my password so it ends by @.

For exampl

2条回答
  •  难免孤独
    2021-01-21 13:09

    You have to "URL encode" the username and password. See https://tools.ietf.org/html/rfc3986 for percent encoding.

    @ will be encoded as %40, so the url would look like: https://myAccountName:123456789%40@github.com/XXXX/xxx

    Here is a tool for this: http://meyerweb.com/eric/tools/dencoder/ or just use an ASCII table ;).


    Alternatives would be to use a git store for storing credentials, use the .netrc file, or use SSH keys.

提交回复
热议问题