Bug 2060419 - Create new app from a private git repository using 'oc new app' with basic auth does not work.
Summary: Create new app from a private git repository using 'oc new app' with basic au...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Build
Version: 4.9
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.10.z
Assignee: Gabe Montero
QA Contact: Jitendar Singh
URL:
Whiteboard:
Depends On: 2052578
Blocks: 2065174
TreeView+ depends on / blocked
 
Reported: 2022-03-03 13:50 UTC by OpenShift BugZilla Robot
Modified: 2022-04-08 05:04 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-04-08 05:04:20 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift oc pull 1083 0 None Merged [release-4.10] Bug 2060419: reuse SourceRepository.DetectAuth during argument classification for consistent interaction ... 2022-03-24 08:55:19 UTC
Red Hat Product Errata RHSA-2022:1162 0 None None None 2022-04-08 05:04:39 UTC

Comment 6 Jitendar Singh 2022-04-06 08:00:58 UTC
verified
=======================
 jitsingh@fedora  ~/go/src/github.com/prinquest   main   oc login https://api.rhoms-4.10-040604.dev.openshiftappsvc.org:6443 -u kubeadmin -p xxxxxxxxxxxxxxxxxxxxx                                                                            
 jitsingh@fedora  ~/go/src/github.com/prinquest   main  >....                                                                             
 ✘ jitsingh@fedora  ~/go/src/github.com/prinquest   main  oc get sa
NAME       SECRETS   AGE
builder    2         32s
default    2         32s
deployer   2         32s
pipeline   2         32s
 jitsingh@fedora  ~/go/src/github.com/prinquest   main  >....                                                                             
 ✘ jitsingh@fedora  ~/go/src/github.com/prinquest   main   oc create secret generic user-at-github --from-literal=username=xxxxxxxx --from-literal=password=xxxxxxxxxxxx --type=kubernetes.io/basic-auth
secret/user-at-github created
 jitsingh@fedora  ~/go/src/github.com/prinquest   main  oc get secrets
NAME                       TYPE                                  DATA   AGE
builder-dockercfg-7gpqh    kubernetes.io/dockercfg               1      2m1s
builder-token-lncc7        kubernetes.io/service-account-token   4      2m1s
builder-token-rqll4        kubernetes.io/service-account-token   4      2m1s
default-dockercfg-4h7t6    kubernetes.io/dockercfg               1      2m1s
default-token-79n72        kubernetes.io/service-account-token   4      2m1s
 jitsingh@fedora  ~/go/src/github.com/prinquest   main  oc new-app --source-secret=user-at-github https://github.com/xxxxxxxxxx/prinquest.git
warning: Cannot check if git requires authentication.
--> Found container image 3a9e80f (4 months old) from docker.io for "docker.io/python:3.6-alpine"

    * An image stream tag will be created as "python:3.6-alpine" that will track the source image
    * A Docker build using source code from https://github.com/jitendar-singh/prinquest.git will be created
      * The resulting image will be pushed to image stream tag "prinquest:latest"
      * Every time "python:3.6-alpine" changes a new build will be triggered
      * WARNING: this source repository may require credentials.
                 Create a secret with your git credentials and use 'oc set build-secret' to assign it to the build config.

--> Creating resources ...
    imagestream.image.openshift.io "python" created
    imagestream.image.openshift.io "prinquest" created
    buildconfig.build.openshift.io "prinquest" created
    deployment.apps "prinquest" created
    service "prinquest" created
--> Success
    Build scheduled, use 'oc logs -f buildconfig/prinquest' to track its progress.
    Application is not exposed. You can expose services to the outside world by executing one or more of the commands below:
     'oc expose service/prinquest' 
    Run 'oc status' to view your app.
 jitsingh@fedora  ~/go/src/github.com/prinquest   main  oc get bc
NAME        TYPE     FROM   LATEST
prinquest   Docker   Git    1
 jitsingh@fedora  ~/go/src/github.com/prinquest   main  oc logs -f buildconfig/prinquest
Cloning "https://github.com/jitendar-singh/prinquest.git" ...
        Commit: 845e68c2ae3aee80cfdd4c1793eb4ed5c60f3036 (first commit)
        Author: Jitendar Singh <jitsingh>
        Date:   Wed Apr 6 13:19:06 2022 +0530
Replaced Dockerfile FROM image docker.io/python:3.6-alpine
time="2022-04-06T07:58:39Z" level=info msg="Not using native diff for overlay, this may cause degraded performance for building images: kernel has CONFIG_OVERLAY_FS_REDIRECT_DIR enabled"
I0406 07:58:39.018575       1 defaults.go:102] Defaulting to storage driver "overlay" with options [mountopt=metacopy=on].
Caching blobs under "/var/cache/blobs".

Pulling image docker.io/python@sha256:bc3447f6ba006c2268ccab840236cd1e27502a1d9133381f17db8bfc603bc810 ...
Trying to pull docker.io/library/python@sha256:bc3447f6ba006c2268ccab840236cd1e27502a1d9133381f17db8bfc603bc810...
Getting image source signatures
Copying blob sha256:8786870f287676cca49c1e1e5029467c087ad293b824fcddc489cbe2819745b2
Copying blob sha256:59bf1c3509f33515622619af21ed55bbe26d24913cedbca106468a5fb37a50c3
Copying blob sha256:acb0e804800ed3c10624ddeac73a6ebd3f2d6dbb03970f054233ae066cd033ba
Copying blob sha256:52bedcb3e853dd5d782c46d387f2af404af9ec75c2aba3a3114e9fbf913c82ed
Copying blob sha256:b064415ed3d75cd9bf462c4ea1a29aebe67dfe8fc76e672dc6bd72f29e91061b
Copying config sha256:3a9e80fa460687aa888ebe54540132662b58a3bb1a222c3809fd412d4652eb9c
Writing manifest to image destination
Storing signatures
Adding transient rw bind mount for /run/secrets/rhsm
STEP 1/12: FROM docker.io/python@sha256:bc3447f6ba006c2268ccab840236cd1e27502a1d9133381f17db8bfc603bc810
STEP 2/12: RUN pip install flask
Collecting flask
  Downloading Flask-2.0.3-py3-none-any.whl (95 kB)
Collecting Jinja2>=3.0
  Downloading Jinja2-3.0.3-py3-none-any.whl (133 kB)
Collecting click>=7.1.2
  Downloading click-8.0.4-py3-none-any.whl (97 kB)
Collecting Werkzeug>=2.0
  Downloading Werkzeug-2.0.3-py3-none-any.whl (289 kB)
Collecting itsdangerous>=2.0
  Downloading itsdangerous-2.0.1-py3-none-any.whl (18 kB)
Collecting importlib-metadata
  Downloading importlib_metadata-4.8.3-py3-none-any.whl (17 kB)
Collecting MarkupSafe>=2.0
  Downloading MarkupSafe-2.0.1-cp36-cp36m-musllinux_1_1_x86_64.whl (29 kB)
Collecting dataclasses
  Downloading dataclasses-0.8-py3-none-any.whl (19 kB)
Collecting typing-extensions>=3.6.4
  Downloading typing_extensions-4.1.1-py3-none-any.whl (26 kB)
Collecting zipp>=0.5
  Downloading zipp-3.6.0-py3-none-any.whl (5.3 kB)
Installing collected packages: zipp, typing-extensions, MarkupSafe, importlib-metadata, dataclasses, Werkzeug, Jinja2, itsdangerous, click, flask
Successfully installed Jinja2-3.0.3 MarkupSafe-2.0.1 Werkzeug-2.0.3 click-8.0.4 dataclasses-0.8 flask-2.0.3 importlib-metadata-4.8.3 itsdangerous-2.0.1 typing-extensions-4.1.1 zipp-3.6.0
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
WARNING: You are using pip version 21.2.4; however, version 21.3.1 is available.
You should consider upgrading via the '/usr/local/bin/python -m pip install --upgrade pip' command.
time="2022-04-06T07:58:44Z" level=warning msg="Adding metacopy option, configured globally"
--> af61d7378f4
STEP 3/12: EXPOSE 8080
--> 92138818d8b
STEP 4/12: USER root
--> adab0776103
STEP 5/12: COPY . /prinquest
time="2022-04-06T07:58:45Z" level=warning msg="Adding metacopy option, configured globally"
--> b5748ef305d
STEP 6/12: RUN chgrp -R 0 /prinquest     && chmod -R g=u /prinquest
time="2022-04-06T07:58:46Z" level=warning msg="Adding metacopy option, configured globally"
--> a3e6bc2c6a2
STEP 7/12: USER 1001
--> 772aa6b7d9f
STEP 8/12: WORKDIR /prinquest
--> 4fcbf24c731
STEP 9/12: ENTRYPOINT ["python"]
--> ede5bbb8aa1
STEP 10/12: CMD ["app/app.py"]
--> e1de58ffca5
STEP 11/12: ENV "OPENSHIFT_BUILD_NAME"="prinquest-1" "OPENSHIFT_BUILD_NAMESPACE"="bzs" "OPENSHIFT_BUILD_SOURCE"="https://github.com/jitendar-singh/prinquest.git" "OPENSHIFT_BUILD_COMMIT"="845e68c2ae3aee80cfdd4c1793eb4ed5c60f3036"
--> c8f949a0f92
STEP 12/12: LABEL "io.openshift.build.commit.author"="Jitendar Singh <jitsingh>" "io.openshift.build.commit.date"="Wed Apr 6 13:19:06 2022 +0530" "io.openshift.build.commit.id"="845e68c2ae3aee80cfdd4c1793eb4ed5c60f3036" "io.openshift.build.commit.message"="first commit" "io.openshift.build.commit.ref"="main" "io.openshift.build.name"="prinquest-1" "io.openshift.build.namespace"="bzs"
COMMIT temp.builder.openshift.io/bzs/prinquest-1:3d68a285
--> 3fd7053b047
Successfully tagged temp.builder.openshift.io/bzs/prinquest-1:3d68a285
3fd7053b047320a48725efc5e1f339992ed97c5a7ba9bd5eecb69243001aec2e

Pushing image image-registry.openshift-image-registry.svc:5000/bzs/prinquest:latest ...
Getting image source signatures
Copying blob sha256:59bf1c3509f33515622619af21ed55bbe26d24913cedbca106468a5fb37a50c3
Copying blob sha256:b064415ed3d75cd9bf462c4ea1a29aebe67dfe8fc76e672dc6bd72f29e91061b
Copying blob sha256:8786870f287676cca49c1e1e5029467c087ad293b824fcddc489cbe2819745b2
Copying blob sha256:52bedcb3e853dd5d782c46d387f2af404af9ec75c2aba3a3114e9fbf913c82ed
Copying blob sha256:664847b2636b38857929095dc735df382924264460b0241baf6359fe770b965a
Copying blob sha256:acb0e804800ed3c10624ddeac73a6ebd3f2d6dbb03970f054233ae066cd033ba
Copying blob sha256:9028144ea0871d2c7665550e1e8a7e13bdb916758ea014f8b9f0751191b9cf69
Copying blob sha256:1249f1211330433d35eb4c5922d8e90fa4459b1deb8bbbc8d47e35e2234c4f95
Copying config sha256:3fd7053b047320a48725efc5e1f339992ed97c5a7ba9bd5eecb69243001aec2e
Writing manifest to image destination
Storing signatures
Successfully pushed image-registry.openshift-image-registry.svc:5000/bzs/prinquest@sha256:e7d29d76dccbfd3e965830bf59c39a92d3bcb0d1a7162d4e0400881261520dac
Push successful

Comment 8 errata-xmlrpc 2022-04-08 05:04:20 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Important: OpenShift Container Platform 4.10.8 bug fix and security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:1162


Note You need to log in before you can comment on or make changes to this bug.