Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS#911 - Problem with login into private git repos #6658

Open
openwrt-bot opened this issue Jul 17, 2017 · 9 comments
Open

FS#911 - Problem with login into private git repos #6658

openwrt-bot opened this issue Jul 17, 2017 · 9 comments
Labels

Comments

@openwrt-bot
Copy link

zokl:

I am not able to use packages from my private git repos which needs login. The system during the build process don't ask me for login as before.

Here is the verbose log output:

make[3]: Leaving directory `/home/flowtester/caes/platform/package/base-files' make[3]: Entering directory `/home/flowtester/caes/platform/package-bumblebee/packages/libdevereader' mkdir -p /home/flowtester/caes/platform/dl SHELL= flock /home/flowtester/caes/platform/tmp/.libdevereader-1.1.7-daa94e0fad44a000892570665e6c792fd9cad860.tar.gz.flock -c ' echo "Checking out files from the git repository..."; mkdir -p /home/flowtester/caes/platform/tmp/dl && cd /home/flowtester/caes/platform/tmp/dl && rm -rf libdevereader-1.1.7-daa94e0fad44a000892570665e6c792fd9cad860 && [ \! -d libdevereader-1.1.7-daa94e0fad44a000892570665e6c792fd9cad860 ] && git clone https://redmine.develict.com/git/devereader libdevereader-1.1.7-daa94e0fad44a000892570665e6c792fd9cad860 && (cd libdevereader-1.1.7-daa94e0fad44a000892570665e6c792fd9cad860 && git checkout daa94e0fad44a000892570665e6c792fd9cad860 && git submodule update --init --recursive) && echo "Packing checkout..." && export TAR_TIMESTAMP=`cd libdevereader-1.1.7-daa94e0fad44a000892570665e6c792fd9cad860 && git log -1 --format='\''@%ct'\''` && rm -rf libdevereader-1.1.7-daa94e0fad44a000892570665e6c792fd9cad860/.git && tar --numeric-owner --owner=0 --group=0 --sort=name ${TAR_TIMESTAMP:+--mtime="$TAR_TIMESTAMP"} -c libdevereader-1.1.7-daa94e0fad44a000892570665e6c792fd9cad860 | gzip -nc > /home/flowtester/caes/platform/tmp/dl/libdevereader-1.1.7-daa94e0fad44a000892570665e6c792fd9cad860.tar.gz && mv /home/flowtester/caes/platform/tmp/dl/libdevereader-1.1.7-daa94e0fad44a000892570665e6c792fd9cad860.tar.gz /home/flowtester/caes/platform/dl/ && rm -rf libdevereader-1.1.7-daa94e0fad44a000892570665e6c792fd9cad860; ' Checking out files from the git repository... Cloning into 'libdevereader-1.1.7-daa94e0fad44a000892570665e6c792fd9cad860'... fatal: Authentication failed for 'https://redmine.develict.com/git/devereader/' make[3]: *** [/home/flowtester/caes/platform/dl/libdevereader-1.1.7-daa94e0fad44a000892570665e6c792fd9cad860.tar.gz] Error 128 make[3]: Leaving directory `/home/flowtester/caes/platform/package-bumblebee/packages/libdevereader' make[2]: *** [package/feeds/bumblebee/libdevereader/compile] Error 2 make[2]: Leaving directory `/home/flowtester/caes/platform' make[1]: *** [/home/flowtester/caes/platform/staging_dir/target-mipsel_24kc_musl/stamp/.package_compile] Error 2 make[1]: Leaving directory `/home/flowtester/caes/platform' make: *** [world] Error 2

If I try it manually from cli everythings works but not during the prepare process ....

@openwrt-bot
Copy link
Author

bjonglez:

Hi,

It's not realistic to have user interaction during the build process.

You should setup authentication to your git repository using SSH keys, so that it does not need user interaction.

@openwrt-bot
Copy link
Author

zokl:

I know, it is not common, but few days ago it works and now not. A lot of project is setup by this way. Is it a problem to use this way for autentization?

@openwrt-bot
Copy link
Author

bjonglez:

Can you point out which commit broke this? You can use git-bisect for this.

It's not a problem per se, it's just an uncommon use-case. Also it does not seem very practical to have to enter a login and a password each time you want to build.

@openwrt-bot
Copy link
Author

zokl:

Yes, I know, but the git hosting system which we use doesn't support user ssl keys. For now it is not possible to change it.

I would like to know what hapends? It is some modification in lede? OpenWRT works as before ....

@openwrt-bot
Copy link
Author

bjonglez:

The build system has changed a lot since OpenWrt, in particular to be faster. It seems like this change is an unwanted side-effect. Did this work with LEDE before? If so, please find which LEDE commit broke support for this use-case.

As a workaround, you can use GIT_ASKPASS or core.askPass. For instance, something like this:

git config core.askPass "cat /home/myuser/mygitpassword.txt"

where mygitpassword.txt contains the password. Or use something more complicated with a secure keystore.

@openwrt-bot
Copy link
Author

zokl:

I try the askPass variable but it doesnt help me. In CLI is login OK, but not in LEDE environment.

@openwrt-bot
Copy link
Author

zokl:

Hello,

commmit ID bad2f9c works fine and shell ask for login and password in case of git and https. The problem is in file include/toplevel.mk. If I use version from oldest LEDE it works fine. New version does not ask for login to https.

The problem is in variable GIT_ASKPASS which is set to /bin/true after disable it, everything works fine.

diff --git a/include/toplevel.mk b/include/toplevel.mk index 3f5a750030..6e09230308 100644 --- a/include/toplevel.mk +++ b/include/toplevel.mk @@ -23,7 +23,7 @@ HOSTCC ?= $(CC) export REVISION export SOURCE_DATE_EPOCH export GIT_CONFIG_PARAMETERS='core.autocrlf=false' -export GIT_ASKPASS:=/bin/true +#export GIT_ASKPASS:=/bin/true export MAKE_JOBSERVER=$(filter --jobserver%,$(MAKEFLAGS)) export GNU_HOST_NAME:=$(shell $(TOPDIR)/scripts/config.guess) export HOST_OS:=$(shell uname)

@openwrt-bot
Copy link
Author

zokl:

The problem is from this commit: lede-project/source@acc5ab6#diff-9ab71f53852fa19e9b86df9cef4b9bd3

@openwrt-bot
Copy link
Author

zokl:

I think it would be better to have a login queried by default. Now an error occurs and the user does not know ....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant