The command runs well below:
wget --header 'Authorization: token GIT_PERSONAL_ACESS_TOKEN' https://raw.githubusercontent.com/.../.../main/repo/packages/.../file.txt -P /opt/tomcat`
but I'm trying to extract the token, and run a shell script as below:
read -p "pls input the token: " token
echo "print out my token: ${token}"
header="Authorization: token ${token}"
header=\'$header\'
echo "print out my header: ${header}"
wget --header "${header}" https://raw.githubusercontent.com/.../.../main/repo/packages/.../file.txt -P /opt/tomcat
and I gain the 404 Not Found Respond:
wget version: 1.14
Does anyone have a clue to solve this problem~?
finally figure out the reason by wget -d: delete the apostrophe around the header and it works fine for me.
enter image description here
enter image description here