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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't clone private repos when scanning #675

Open
ahmdyasser opened this issue Nov 15, 2023 · 5 comments
Open

Can't clone private repos when scanning #675

ahmdyasser opened this issue Nov 15, 2023 · 5 comments
Labels
needs investigation Bug report that needs confirmation

Comments

@ahmdyasser
Copy link

When I try to build the project using xcodebuild command it builds successfully, but when I try to run Periphery, it gives me an error that I don't have access to a private repo (which I do have access to)

Error 馃毃:

periphery scan --project XYZ.xcodeproj --schemes XYZ  --clean-build
* Inspecting project...
* Building XYZ...
error: Shell command '/bin/sh -c xcodebuild -project '/Users/ahmadyasser/Documents//XYZ.xcodeproj' -scheme 'XYZ' -parallelizeTargets -derivedDataPath '/Users/ahmadyasser/Library/Caches/com.github.peripheryapp/DerivedData-66819cbe-3304282e-3304282e' -quiet build CODE_SIGNING_ALLOWED="NO" ENABLE_BITCODE="NO" DEBUG_INFORMATION_FORMAT="dwarf" COMPILER_INDEX_STORE_ENABLE="YES" INDEX_ENABLE_DATA_STORE="YES"' returned exit status '74':
2023-11-15 12:44:13.411 xcodebuild[28412:218271] Writing error result bundle to /var/folders/28/x4jsqs3x4v92hz54h17ycbk80000gn/T/ResultBundle_2023-15-11_12-44-0013.xcresult
xcodebuild: error: Could not resolve package dependencies:
  Failed to clone repository git@github.com:COMPANY/PRIVATE_XYZ.git:
    Cloning into bare repository '/Users/ahmadyasser/Library/Caches/com.github.peripheryapp/DerivedData-66819cbe-3304282e-3304282e/SourcePackages/repositories/PRIVATE_XYZ-58530665'...
    ERROR: Repository not found.
    fatal: Could not read from remote repository.
    Please make sure you have the correct access rights
    and the repository exists.
@ahmdyasser ahmdyasser changed the title Can't clone private repos when when scanning Can't clone private repos when scanning Nov 15, 2023
@vani2
Copy link

vani2 commented Nov 21, 2023

Same thing for me but with public repo dependency

@ileitch ileitch added the needs investigation Bug report that needs confirmation label Nov 25, 2023
@kanduvisla
Copy link

I have the same issue with private repositories.

Building the "regular" project in XCode works just fine, but periphery is not able to pull dependencies from my private repo.

Any updates on this from anyone? Maybe a workaround?

@ahmdyasser
Copy link
Author

@kanduvisla Nothing yet from my side, if I found anything I'll share it here.

@kanduvisla
Copy link

@ahmdyasser I did manage to get some sort of workaround, but it's not working for me (but maybe it will for you). The idea is to separate the build and the scan:

# 1. use xcodebuild
xcodebuild -scheme MyScheme -destination 'platform=iOS Simulator,OS=16.2,name=iPhone 14' -derivedDataPath '../dd' clean build

# 2. use produced index store for scanning
periphery scan --skip-build --index-store-path '../dd/Index.noindex/DataStore/'

But in my case, the scan shows almost all my files as false postives (#711), but maybe you'll get different results. If so: could you please share this? Then we can see if it's periphery-related, or project-related.

@ahmdyasser
Copy link
Author

@kanduvisla When I try to run the first command it gives me this error
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs investigation Bug report that needs confirmation
Projects
None yet
Development

No branches or pull requests

4 participants