# FAQ

##### \[GitHub\] 無法 git push

錯誤訊息

> remote: Support for password authentication was removed on August 13, 2021.  
> remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.  
> fatal: 'https://github.com/a-lang/benchy.git/' 身份驗證失敗

解決方案：從 2021/8/13 起，GitHub 在 push 專案時不再接受密碼認證，替代方法可以使用一個較快速的 personal token。

先從 GitHub 網站新增一個 personal token

GitHub &gt; Setting &gt; Developer Settings &gt; Personal Access Token &gt; Tokens (classic)

這個 token 是用來取代密碼，git push 時出現密碼詢問，就輸入 token。

如果不想每次都輸入 token，可以將 token 記憶在系統裡

```bash
git config --global credential.helper cache
```

更換 token 後，刪除舊的 token

```bash
git config --global --unset credential.helper
git config --system --unset credential.helper
```

##### git clone 錯誤訊息  


> (gnome-ssh-askpass:23713): Gtk-WARNING \*\*: cannot open display

暫時解法:

```
unset SSH_ASKPASS
```

永久解法: 編輯 `~/.bash_profile`

```
# Fixed for the error with the git
export GIT_ASKPASS=
```

##### git log 不能正常顯示顏色

在 AIX 7.2 系統無法正確顯示顏色

> ^\[\[33mcommit 98d696dfa800b847640f1f9b9402f9a548c087b8^\[\[m^\[\[33m (^\[\[m^\[\[1;36mHEAD -&gt; ^\[\[m^\[\[1;32mmaste  
> r^\[\[m^\[\[33m, ^\[\[m^\[\[1;31morigin/master^\[\[m^\[\[33m, ^\[\[m^\[\[1;31morigin/HEAD^\[\[m^\[\[33m)^\[\[m  
> Author: Alang &lt;alanghsu@my.com&gt;  
> Date: Thu Aug 7 15:21:46 2025 +0800

新增或編輯 `~/.gitconfig`

```
[core]
    pager = less -R
```